Need elastic query to fetch list of docs from one index based on list of one type field

Hi Team,

I Need elastic query to fetch list of docs from one index based on list of one type of field(Just like "IN" operator in DB2).

Example:
GET /my_country_index/_search?size=2000
{"query": {

    "bool":{
      "should/must": [
    { "match" : {"country_cde" : "40"}},
     { "match": {"country_cde" : "44"}},
     { "match": {"country_cde" : "24"}}
    ]
}}} 

Instead of this multi match of multi key, values pairs, is there any possibility to pass values with list.

In DB2, .....IN(40, 44,24) query gives the records which were matched, same as I need elastic query with out multi key, value pairs
because, as i'm a java client for elastic I am passing HashMap for above query so HashMap won't allow duplicate keys.

So I need query with list kind of thing

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.