title: Elasticsearch search on different index with different field of same cluster
body: <p>I need help to search in the different indexes of the same cluster with different fields. For example: If I have a cluster name <strong>demo</strong> in which I have 2 indexes <strong>menu_items</strong> and <strong>purchase_orders</strong>. Both indexes contain different columns to search. Index <strong>menu_items</strong> contains 'label' field and index <strong>purchase_orders</strong> contains 'id' and 'supplier_reference' field.</p>
  <blockquote>
  <pre><code>    $params  = [
          'index'   =&gt; 'menu_items,purchase_orders',
          '_source' =&gt; 'label,id,supplier_reference',
          'body'    =&gt; [
              'query' =&gt; [
                  'bool' =&gt; [
                      'must' =&gt; [
                          'multi_match' =&gt; [
                              'query'  =&gt; $keyword,
                              'type'   =&gt; 'bool_prefix',
                              'fields' =&gt; ['label', 'id', 'supplier_reference'],
                          ],
                      ],
                  ],
              ],
          ],
      ];
  </code></pre>
  </blockquote>
  <p>Now If I am searching for any term '3312' which is available in both indexes so this query working good and another term 'supplier' is not available in another index at that time I got an error.
  Can anyone help here? How can I achieve this? How can we find fields in two or more different indexes?</p>