【发布时间】:2014-12-04 06:14:44
【问题描述】:
我正在使用以下查询来获取记录,但它正在获取误报结果。
<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>
上面的查询是一个通配符查询,应该搜索从“ace”开始的 6 个字母的单词。但我们也得到了包含超过 6 个以“ace”开头的字母单词的结果。
以下是我们使用的索引
- 单词搜索
- 词位
- 快速短语搜索
- 快速区分大小写的搜索
- 快速变音符号敏感搜索
- 快速元素词搜索
- 元素词位置
- 快速元素词组搜索
- 三个字符搜索
- 快速元素字符搜索
- 尾随通配符搜索
- 快速元素尾随通配符搜索
我们还在执行搜索时使用了“未过滤”选项。
任何帮助将不胜感激。
谢谢
【问题讨论】:
标签: marklogic