0

I have the dump of elasticsearch in which a field named as "journey"
under that i have multiple values like, Indian, Australia, Dubai etc.,.
I need to write a query for which i will provide list of journey values that are to be returned (like India and dubai in above example)
I have written a code like this

{
         "filter": {
         "terms": {
            "journey": [
               "India",
               "Dubai"
            ]
         }
       }  
      }

but i an not getting the results.

Rockon
  • 1
  • 1

1 Answers1

0

Since your field is analyzed, it's been lowercase at indexing time.

So your query needs to look like this instead:

{
   "query": {
     "terms": {
        "journey": [
           "india",
           "dubai"
        ]
     }
   }  
}
Val
  • 207,596
  • 13
  • 358
  • 360