Hi guys
I have a question when matching a field with array.
Here is my data:
Item1:
{
"names": ["foo-123-sth-more", "bar-456-sth-more"]
}
Item2:
{
"names": ["foo-456-sth-more", "bar-123-sth-more"]
}
My query is
{
"query": {
"match" : {
"names" : {
"query" : "foo 456",
"operator" : "and"
}
}
}
}
Both item1 and item2 will matched, but the expected result is only item2 match, every element in array should be consider as an independent text to handle.
Is there any one could tell me how to handle this case? thank you.