Geert and Andreas,

 

Thanks for pointing out tokens vs. values that I wasn’t understanding.

 

Using ‘filtered’ in cts:search works, but I’ve always tried to avoid that for 
performance reasons.  In this case I’ve added a predicate check in the result 
instead.

 

But to Andreas’s point, it seems that ‘exact’ or ‘punctuation-sensitive’ should 
be able to match, or maybe I’m not understanding the documentation for 
cts:element-value-query.  If it did work I guess there would be extra work 
un-tokenizing?

 

I using ML version 8.0-6

 

Thanks for any clarification,

Gary

 

 

From: [email protected] 
[mailto:[email protected]] On Behalf Of Andreas Hubmer
Sent: Tuesday, February 28, 2017 8:23 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] hyphens and cts:element-value-query

 

Hi Geert,

 

As far as I know there are index entries for "exact" queries in the universal 
index, that include punctuation and whitespace. Thus, Gary's value queries 
should work unfiltered.

 

There is an email by Mary Holstege supporting my assumption: 
http://developer.marklogic.com/pipermail/general/2013-March/012552.html

 

Cheers,

Andreas

 

 

 

2017-02-28 13:58 GMT+01:00 Geert Josten <[email protected]>:

Hi Gary,

 

Sounds like you are running an unfiltered search. Either enable filtering to 
get rid of false positives, or switch to using element-range-query (which 
requires a range index). Keep in mind that value-queries don’t use range 
indexes (even if available), but rely on the universal index, which contains 
tokens, not values..

 

Cheers,

Geert

 

From: <[email protected]> on behalf of Gary Larsen 
<[email protected]>
Reply-To: MarkLogic Developer Discussion <[email protected]>
Date: Monday, February 27, 2017 at 10:01 PM
To: 'General MarkLogic Developer Discussion' <[email protected]>
Subject: [MarkLogic Dev General] hyphens and cts:element-value-query

 

I’m trying to get this cts query to treat hyphens as text:

 

cts:element-value-query(xs:QName(ename), 'value 1', ‘exact’)

cts:element-value-query(xs:QName(ename), 'value-1', ‘exact’)

 

Even though the ename  value-1 does not exist a match is found.   

 

Thanks,

Gary


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

 

 

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

Reply via email to