Hi Andreas, Sounds like a bug indeed. It is as if it appends a case-insensitive flag despite the ‘exact’, because of the all-lowercase ’new’. Can you tell which version of MarkLogic you are running, and on which architecture?
Cheers, Geert From: <[email protected]<mailto:[email protected]>> on behalf of Andreas Hubmer <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Thursday, March 23, 2017 at 8:40 AM To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] Unfiltered, exact searches Hi, There seems to be a bug related to unfiltered and exact value searches. We are using value queries in the Java API, but I've boiled it down to cts searches. The following snippet exhibits the wrong behavior: xquery version "1.0-ml"; xdmp:document-insert("/bug/doc.xml", <status>NEW</status>) ; "Document is found: OK", cts:search(/, cts:and-query((cts:directory-query("/bug/", "infinity"), cts:element-value-query(xs:QName("status"), "NEW", ("exact")))), "unfiltered" ) ,"---", "Document is not found: OK", cts:search(/, cts:and-query((cts:directory-query("/bug/", "infinity"), cts:element-value-query(xs:QName("status"), "NEw", ("exact")))), "unfiltered" ) ,"---", "Document is found: WRONG", cts:search(/, cts:and-query((cts:directory-query("/bug/", "infinity"), cts:element-value-query(xs:QName("status"), "new", ("exact")))), "unfiltered" ) We are using a database with fast-case-sensitive-searches and fast-diacritic-sensitive-searches turned on, while all other indexes are turned off. As far as I know only the two indexes are needed for unfiltered exact value searches. Regards, Andreas
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
