Searching words with spaces for word without spaces in solr

心不动则不痛 提交于 2019-12-12 04:36:11

问题


how can i search "ice cube" if I have "icecube" in my index. I have set mm as 2<-1 4<70%. While using shingle in query analyzer, the query "ice cube" creates three tokens as "ice","cube", "icecube". But mm is the limitation here. Only ice and cubes are searched but not "icecubes".i.e not working for pair though I am using shingle filter. However in analysis tool, three tokens are created. How to solve it ?. Here the schema configuration link: http://pastebin.com/74xaKEyv


回答1:


I think you should use the Shingle filter only at indexation in your schema.

Try removing <filter class="solr.ShingleFilterFactory" maxShingleSize="2" outputUnigrams="true" tokenSeparator=""/> from the query part of your analyzer.



来源:https://stackoverflow.com/questions/18502261/searching-words-with-spaces-for-word-without-spaces-in-solr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!