I am using the following query for fetching the records, but it is fetching the false positive results.
<cts:and-query xmlns:cts="http://marklogic.com/cts">
<cts:or-query>
<cts:element-value-query>
<cts:element>type</cts:element>
<cts:text xml:lang="en">article</cts:text>
</cts:element-value-query>
</cts:or-query>
<cts:element-query>
<cts:element>body</cts:element>
<cts:word-query>
<cts:text xml:lang="en">ace???</cts:text>
<cts:option>case-insensitive</cts:option>
<cts:option>diacritic-insensitive</cts:option>
<cts:option>punctuation-insensitive</cts:option>
<cts:option>whitespace-insensitive</cts:option>
<cts:option>stemmed</cts:option>
<cts:option>wildcarded</cts:option>
</cts:word-query>
</cts:element-query>
<cts:or-query>
<cts:element-range-query operator=">=">
<cts:element>expires-on</cts:element>
<cts:value xsi:type="xs:dateTime" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2014-12-04T06:05:29.78Z</cts:value>
</cts:element-range-query>
<cts:not-query>
<cts:element-value-query>
<cts:element>expires-on</cts:element>
<cts:text xml:lang="en">*</cts:text>
<cts:option>wildcarded</cts:option>
</cts:element-value-query>
</cts:not-query>
</cts:or-query>
</cts:and-query>
</results>
The above query is a wildcarded query and should search for the 6 letter words starting from the "ace". But we are also getting the results which contain more than 6 letter words starting from "ace".
Following are the indexes we are using
- word searches
- word positions
- fast phrase searches
- fast case sensitive searches
- fast diacritic sensitive searches
- fast element word searches
- element word positions
- fast element phrase searches
- three character searches
- fast element character searches
- trailing wildcard searches
- fast element trailing wildcard searches
Also we are using the 'unfiltered" option while performing the search.
Any help will be appreciated.
Thanks