|
Hi Lancelot ,
cts:field-value-query()
matches the full text content
containing a given value in the specified field.
Example: if a element is containing the "development" then you have to pass
"development" as search string parameter in cts:field-value-query().
Please refer : https://docs.marklogic.com/cts:field-value-query
cts:field-word-query() matches text
content containing a given phrase in the specified field.
Example : if a element is containing the "development" then you can pass the "dev" as search string parameter in cts:field-word-query()
So, that's why you are able to get result while using cts:field-word-query()
function.
Please refer : https://docs.marklogic.com/cts:field-word-query
Regards,
Asit Nautiyal
From: [email protected] [[email protected]] on behalf of Lanz [[email protected]]
Sent: Monday, May 11, 2015 4:17 PM To: general Subject: [MarkLogic Dev General] wildcarded search with cts:field-value-query hi all,
I'm facing an issue using cts:field-value-query with wildcarded search in ML 7.0-5 Following search should match any field starting with 'dev' like development, etc. let $term := 'dev' return cts:search( fn:collection()/l:manifestation[l:issn], cts:field-value-query( 'field-quick-search', $term || '*', ('case-insensitive', 'diacritic-insensitive', 'unstemmed', 'wildcarded') ) ) But its returns nothing Fields 'field-quick-search' seems to be well configured to work with wildcarded search: Name: field-quick-search Path: *:title, *:subTitle, *:doiSuffix, *:code, *:userCode, *:issn, @id Includes: work, _expression_, manifestation Excludes (nothing) Index Settings: +word, +fast phrase, +fast case sensitive, +fast diacritic sensitive, +trailing wildcard, +three character, +two character The same search with cts:field-word-query works : let $term := 'dev' return cts:search( fn:collection()/l:manifestation[l:issn], cts:field-word-query( 'field-quick-search', $term || '*', ('case-insensitive', 'diacritic-insensitive', 'unstemmed', 'wildcarded') ) ) Any thoughts on what I might be doing wrong?
Thanks
Lancelot
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. ---------------------------------------------------------------------------------------------------------------------------------------------------- |
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
