问题
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