1

I'm using solr 4.6.1 and created a autocomplete suggester using the technique listed at the solr documentation. I use the

<str name="lookupImpl"> org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory</str>

and

<str name="suggestAnalyzerFieldType">text_general</str>

The issue I have is that the output I get has the match in bold.

output

How do I prevent the matches from being made bold?

Phuc Thai
  • 718
  • 7
  • 17
navinpai
  • 955
  • 11
  • 33

3 Answers3

3

For Solr version 6.6
I have done the below to remove the highlighting from the response.
In the solrconfig.xml add the <str name="highlight">false</str> to your searchComponent.
This is being discussed here Like this

<searchComponent name="suggest" class="solr.SuggestComponent">
  <lst name="suggester">
    <str name="name">productSuggester</str>
    <!--<str name="lookupImpl">FuzzyLookupFactory</str> -->
    <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
    <str name="dictionaryImpl">DocumentDictionaryFactory</str>
    <str name="field">product_name</str>
    <!-- <str name="weightField">price</str> -->
     <str name="buildOnCommit">true</str>
    <str name="suggestAnalyzerFieldType">text_suggest</str>
    <str name="buildOnStartup">true</str>
    <str name="highlight">false</str>
  </lst>
</searchComponent>
Narendra Jaggi
  • 1,297
  • 11
  • 33
0

It is using the simple formatter as and its has pre and post tag.

You can comment those tag in solrconfig.xml and try ..

Here at this link you can find more on highligheter params

https://wiki.apache.org/solr/HighlightingParameters#hl.formatter

Abhijit Bashetti
  • 8,518
  • 7
  • 35
  • 47
0

In solrconfig.xml remove the following tags.

 <str name="hl.simple.pre">&lt;b&gt;</str>
 <str name="hl.simple.post">&lt;/b&gt;</str>

If you do not want highlighting.You can disable highlighting by

<str name="hl">off</str>
Ajay K
  • 436
  • 1
  • 4
  • 10