目前我有这样的样本数据:
<doc>
<int name="name">Nice Dress</int>
<arr name="keyword">
<str>best cocktail dress</str>
<str>platform complete pumps</str>
<str>platform pumps</str>
<str>slip dress</str>
</arr>我对“关键字”字段使用了多个值。
案例1
defType:edismax
qf:keyword
q:cocktail dresssolr将返回数据。
案例2
defType:edismax
qf:keyword
q:coctail dress pump它仍然返回数据,如果我们从样本数据,没有关键字包含所有这三个字(‘公尾’‘衣服’‘泵’)在每一行关键字。如何使solr不返回此结果?
谢谢。
发布于 2013-08-29 12:19:16
检查两个参数
positionIncrementGap -对于多值字段,这个参数将决定多值字段中两个字段之间的距离。如果这个值是100,那么两个多值字段之间的距离将是100个位置。
Note -默认positionIncrementGap为0
检查dismax的qs 查询斜率参数,这将决定术语之间的斜率匹配。
发布于 2013-08-29 12:33:37
请尝试以下查询:
q:(coctail dress pump)~100将positionIncrementGap设置为类似于300的内容。
根据数据的时间长短,这些值需要更改。
https://stackoverflow.com/questions/18509198
复制相似问题