Include singular search results when search for plural in Solr

混江龙づ霸主 提交于 2019-12-11 03:38:56

问题


I'm working with Solr 4.1, and got it working correctly. I have the terms in the document which contains "school". It gives search result correctly when searching for "school". However, I want Solr to include these results when searching for "schools".

So basically I want Solr to include singular terms in its search results when searching for plural terms.

Any idea how to do it?


回答1:


You need to apply stemming to your indexed fields in order to achieve this behavior. Please see the Stemming Wiki Page for a complete explanation and an example fieldType to support stemming.



来源:https://stackoverflow.com/questions/18148749/include-singular-search-results-when-search-for-plural-in-solr

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