I'm trying to highlight a search query. The below query, is expected to highlight only elastic search if apple is in the text ... unfortunately, NO ! The highlight function does not take care about the boolean expression. Am I correct ?
I suspect the filter is getting in the way of the terms extraction process. Either use highlight_query to work around it or remove the filtered query from the query.
PS. I edited your query and replaced "`" with "```" to fix the code block. It makes it much easier to read!
You are right. For the most part it just flattens the booleans. If you were using a bool query you could use named queries to know which queries match. But, yeah, highlighting tends to flatten.
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.