英文:
I'm using solr for address searching and I get different results depends on word order
问题
这是正确行为吗,还是我需要进行一些额外的设置?
我创建了一个自定义过滤器,用于删除特殊字符并添加同义词。
英文:
Is this correct behavior or do I need to do some extra setting?
I created custom filter where remove special characters and add synonyms
答案1
得分: 1
在Solr中,搜索是一个两步过程,首先匹配文档,然后对它们进行评分以排序结果。评分考虑了一个词与另一个词的距离,因此如果查询中词的顺序改变,评分会受到影响。
如果在字段定义中使用omitPositions="true"来省略单词位置的存储,搜索就不会受到词序的影响。在Solr字段文档中,您可以找到更多选项以及它们对搜索的影响描述。
英文:
the search in Solr is a two step process, first the documents are matched, and second they are scored for ordering the results. The scoring takes in account how near are one term to the other, so if the order of the words in the query change, the scoring is affected.
if you omit the storing of word positions with omitPositions="true" in the field definition, and then the search should not be affected by the word order. In the Solr fields documentation you have many more options and how they affect the search described.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论