MySQL query to Elasticsearch query
<p>I'm trying get the best performance for an Elasticsearch query.<br>
I need something similar to this MySQL query:  </p>

<pre><code>SELECT * FROM table WHERE field_a IN ('value1', 'value2') AND field_b = value
</code></pre>

<p>The number of values for <code>field_a</code> may be between 1 and let's say 20.
All fields require an exact match.  </p>

<p>Right now I'm using query:   </p>

<pre><code>{
   "query" : {
      "constant_score" : { 
         "filter" : {
            "bool" : {
              "should" : [
                 { "term" : {"field_a" : "value1"}}, 
                 { "term" : {"field_a" : "value2"}} 
              ],
              "must" : {
                 "term" : {"field_b" : "value"} 
              }
           }
         }
      }
   }
} 
</code></pre>

<p>The index has at this point around 30 million documents and this query returns the result in 0.04s - 0.06s (via cURL).<br>
Is there a better way to get the results I need?</p>

<p><strong>Update</strong><br>
The field_a is a string not analyzed.<br>
The field_b is an integer.</p>