Searching inside an array of strings, i.e.:
{
"ingredients" : ["grilled cheese", "pork", "ketchup"]
}
query:
{
"match" : {
"cities" : {
"query" : "grilled pork",
"operator" : "and"
}
}
}
Query return the element, because tokens "grilled" and "pork" are both present inside ingredients.
The desidered behaviour is to match the document only if all the words in the query are present inside a single string of the array (not necessarily an exact match, it should match "grilled pork ribs" also, for example).
How can I obtain this?