I would like to eliminate html tags when I am performing search on certain fields in elastic. Can this be achieved using html_strip filter? If yes, can I have an example on how to add the analyzer and the filter? Thank you
Thanks. This looks fine. My main concern is, I don't want the field to loose the html tags, because I need them for display. I want to strip them when I search on them.
I believe you have the same problem as this post. In this case there are two indexed fields, one with the html text and the other with the text without html.
@RabBit_BR : We were able to strip the html while searching, by modifying the mapping -
{
"analyzer": "custom_my_analyzer",
"search_analyzer": "default" // the default analyzer used,
}
point to be noted - make sure the custom_my_analyzer inherits the filters from default
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.