how index words with their prefix in solr?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 22:06:02

问题


I use solr 3.3 to index my files, I want solr index words with their suffixes for example I want to index colorful like color and when i search color solr show any document that has colorful.


回答1:


You would need to apply analysis on the field.

Stemming - Its a kind of dictionary. This would reduce the word indexed and searched to its roots.
e.g. color, colors, colored would match your searches, if any word is searched.

There was would be cases where the above stemming does not work.
You can use SynonymFilter, This allows you to specify words which you term as synonym and would match the search results.



来源:https://stackoverflow.com/questions/8292975/how-index-words-with-their-prefix-in-solr

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