Filter items which array contains any of given values

前端 未结 5 1090
萌比男神i
萌比男神i 2020-12-12 15:45

I have a set of documents like

{
    tags:[\'a\',\'b\',\'c\']
    // ... a bunch properties
}

As stated in the title: Is there a way to fil

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 16:16

    You should use Terms Query

    {
        "query" : {
            "terms" : {
                "tags" : ["c", "d"]
            }
        }
    }
    

提交回复
热议问题