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().



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.



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



::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------

_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to