title: How to find multiple exact values on a particular field in elasticsearch query?
body: <p>My Sample Data is shown below:</p>
  
  <p><code>{"listings":{"title" : "testing 1", "address" : { "line1" : "3rd cross", "line2" : "6th main", "line3" : "", "landmark" : "", "location" : "k r puram", "pincode" : "", "city" : "Bangalore" },"purpose":"rent","published": true, "inActive": false },
  {"listings":{"title" : "testing 2", "address" : { "line1" : "3rd cross", "line2" : "6th main", "line3" : "", "landmark" : "", "location" : "banaswadi", "pincode" : "", "city" : "Bangalore" },"purpose":"sale","published": true, "inActive": false },
  {"listings":{"title" : "testing 3", "address" : { "line1" : "3rd cross", "line2" : "6th main", "line3" : "", "landmark" : "", "location" : "tin factory", "pincode" : "", "city" : "Bangalore" },"purpose":"rent","published": true, "inActive": false }</code></p>
  
  <p>My index mapping is shown below:</p>
  
  <pre><code>curl -X PUT localhost:9200/testing/listings/_mapping -d '{
   "listings" : {
      "properties" : {
          "address" : {
             "properties": {
                "location": { "type" : "string",
                              "index" : "not_analyzed"
                 }
              }
          },
          "suggest" : { 
               "type" : "completion", 
               "index_analyzer" : "simple",
               "search_analyzer" : "simple",
               "payloads" : true
          }                              
      }                                  
    }
  }'
  </code></pre>
  
  <p>I access the listings object based on purpose property value like rent or sale.  I am able to access the objects for rent and sale individually.  How can i access listings object for both rent and sale values.  I have used below query to fetch both rent &amp; sale listings object.</p>
  
  <pre><code>{"query":{
     "filtered": {
       "filter": {
         "terms": {
           "purpose" : ["rent", "sale"]
          }
        }
      },
     "bool":{
       "must":[
         {"match":{"published":true}},
         {"match":{"inActive":false}},
         {"match":{"address.city": "bangalore"}}
        ]
     }
   }
  }
  </code></pre>
  
  <p>Please suggest the changes as needed. Thanks in advance.</p>