title: Elasticsearch either or match query
body: <p>I am trying to write a query to search for a products on two columns called <code>category1</code> and <code>category2</code>. I am working using elastic search php client and tried with match should query but this giving me wrong results because of match of substring.</p>
  
  <p>But i am looking for exact match with OR operation on two columns. I am new to this please guide me.</p>
  
  <pre><code>    $params['index'] = 'furnit';
      $params['type']  = 'products';
      $params['body']['query']['bool']['should'] = array(
          array('match' =&gt; array('category1' =&gt; $category-&gt;name)),
          array('match' =&gt; array('category2' =&gt; $category-&gt;name)),
      );
  
      $results = $this-&gt;elasticsearch-&gt;search($params);
  </code></pre>