As an example, there are four documents
{id: 1, tags :["cat", "dog", "horse"]} {id: 2, tags :["dog", "cat"]} {id: 3, tags :["cat"]} {id: 4, tags :["dog"]}
-
If I query tags with
["cat"]
I should only get{id: 3, tags :["cat"]}
-
If I query tags with
["dog"]
I should only get{id: 4, tags :["dog"]}
How can I construct such a query?
https://stackoverflow.com/questions/66069294/elasticsearch-match-only-and-exactly-given-tags-in-tags-array February 06, 2021 at 03:15AM
没有评论:
发表评论