I have a search problem in ES. In the index i have a field that is a list of texts like the following:
list_field = [text1, text2, text3, …]
I want to search for a number of terms that all belong to the same text entry. If one term is in text1 and another is in text2 for example, the search should not return any results.
Is this possible with the current mapping or do i have to come up with a different representation of this field?
I suspect the solution is to use phrase queries and a big “position increment gap”.
Make the phrase queries not require an order and have a “slop” factor greater than the max number of words in a text value but less than the large position increment gap used to put artificial space between the text elements in your array
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.