我想比较两个查询:
1)
xdmp:plan(fn:distinct-values(/ts:top-song/ts:genres/ts:genre/text(), "http://marklogic.com/collation/en/S1/AS/T00BB"))
2)
declare variable $options :=
<options xmlns="http://marklogic.com/appservices/search">
<constraint name="genre">
<range type="xs:string" collation="http://marklogic.com/collation/en/S1/AS/T00BB">
<element ns="http://marklogic.com/MLU/top-songs" name="genre"/>
</range>
</constraint>
</options>;
xdmp:plan(search:search("", $options)/search:facet/search:facet-value)
我有以下问题:
在我得到的两个查询的结果中:Expression is unsearchable。这是一件好事吗?这是否意味着索引已被使用并且无法进行进一步的索引?
(为流派启用范围索引)我猜 fn:distict+Xpath 使用范围索引,但由于 Xpath 而涉及过滤。OTOH 搜索:搜索仅使用值词典,所以它是否进行未过滤的搜索?如果没有,有没有办法以未经过滤的方式找到不同的值?