Reputation: 81
I am new for solr and trying to add new suggest feature for my site. and i already add the suggest feature using AnalyzingInfixLookupFactory to suggest in solrconfig.The suggetion is working fine, but the result in my website is coming like
nestle <b>MILO</b> Activ
but it should come like
"nestle MILO Activ" without the "<b>" "</b>"
how can i setup this on solr??
Here is my solrconfig
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">mySuggest</str>
<str name="lookupImpl">AnalyzingInfixLookupFactory</str>
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
<str name="field">goodsName</str>
<str name="weightField">popularity</str>
<str name="suggestAnalyzerFieldType">text_en</str>
<str name="buildOnStartup">true</str>
</lst>
</searchComponent>
<requestHandler name="/suggest" class="solr.SearchHandler"
>
<lst name="defaults">
<str name="suggest.dictionary">mySuggest</str>
<str name="suggest">true</str>
<str name="suggest.count">10</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>
Upvotes: 1
Views: 504
Reputation: 52822
Since you're using AnalyzingInfixLookupFactory
, it has a custom configuration parameter that allows you to turn off highlighting:
highlight: Highlight suggest terms. Default is true.
So to avoid highlighting your suggestions, setting highlight
to false in your configuration should be enough:
<str name="highlight">false</str>
Upvotes: 2