Sorl Suggester issue

做~自己de王妃 提交于 2020-01-04 05:55:13

问题


I'm using solr Suggester lookupImpl as AnalyzingInfixLookupFactory , it's working fine the only issue i am not able to resolve is the fact I want exact search keyword display on top.

.i.e if I1`q search "Leather bags" then that particular keywords should display on top but it is showing "mens leather", "ladies leather bags" after that it is showing "Leather bags".

<searchComponent name="suggest" class="solr.SuggestComponent">

<lst name="suggester">
<str name="name">mySuggester</str>
<str name="lookupImpl">AnalyzingInfixLookupFactory</str> 
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">search_keyword</str>

<str name="suggestAnalyzerFieldType">text_general</str>
<str name="buildOnStartup">false</str>
</lst>     
</searchComponent>

please help

回答1:


Try by changing the field type for your field suggestAnalyzerFieldType. Currently the field suggestAnalyzerFieldType has text_general as the field type for your field. Use keywordTokenizer for your field if you are looking for exact matches. As it does not create tokens of the text.

The keywordTokenizer is : This tokenizer treats the entire text field as a single token.



来源:https://stackoverflow.com/questions/56850084/sorl-suggester-issue

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