Reputation: 322
I'm using SOLR search for Magento search, got some problem while searching. Please see the image.
In my product description i'm having some html tags. So When we are searching, html tags also coming in auto suggestion without special chars. Is there any possible to eliminate html tags here?
Upvotes: 3
Views: 2549
Reputation: 1301
You can use HTMLStripCharFilterFactory, which will strip HTML tags:
HTMLStripCharFilter strips HTML from the input stream and passes the result to either CharFilter or Tokenizer. Like other CharFilters, it's specified using a tag, and must come before the tokenizer. An example:
<analyzer>
<charFilter class="solr.HTMLStripCharFilterFactory"/>
<tokenizer class="solr.StandardTokenizerFactory"/>
</analyzer>
So, in the analyzer you used, just add this filter.
Upvotes: 5