<p dir="auto">I believe this is a typical use case, we allow a user to type a search string and then use it to search against a set of fields. Unfortunately, currently that doesn't allow to include integer fields (say, document ID) in this set. Following a simple example:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ curl -XGET http://localhost:9200/gallery/item/_search -d '{query:
  {multi_match: {fields: [&quot;id&quot;, &quot;name&quot;], query: &quot;test&quot;}}
}'"><pre class="notranslate">$ curl -XGET http://localhost:9200/gallery/item/_search -d <span class="pl-s"><span class="pl-pds">'</span>{query:</span>
<span class="pl-s">  {multi_match: {fields: ["id", "name"], query: "test"}}</span>
<span class="pl-s">}<span class="pl-pds">'</span></span></pre></div>
<p dir="auto">which gives:<br>
<em>{"error":"SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures {[LJs6UPnTQ_u-Ws0SAna0zA][gallery][0]: SearchParseException[[gallery][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query": {"multi_match": {"fields": ["id", "name"], query: "test"}}}]]]; nested: NumberFormatException[For input string: "test"]; }{[LJs6UPnTQ_u-Ws0SAna0zA][gallery][1]: SearchParseException[[gallery][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query": {"multi_match": {"fields": ["id", "name"], query: "test"}}}]]]; nested: NumberFormatException[For input string: "test"]; }]","status":500}</em></p>
<p dir="auto">I did read the discussions in Google Groups on that matter and I agree that it's not really correct to simply ignore those errors. However, since it <strong>is</strong> a typical use case which is very commonly used  indeed (for instance, that's how Django Admin search_fields works), I believe we need to have a multi_match query option (off by default) which will allow such queries to complete.</p>
<p dir="auto">Supposedly, that will be something like:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ curl -XGET http://localhost:9200/gallery/item/_search -d '{query:
  {multi_match: {fields: [&quot;id&quot;, &quot;name&quot;], query: &quot;test&quot;, &quot;match_field_types&quot;: true}}
}'  # automatically remove 'id' from fields because of the incompatible type"><pre class="notranslate">$ curl -XGET http://localhost:9200/gallery/item/_search -d <span class="pl-s"><span class="pl-pds">'</span>{query:</span>
<span class="pl-s">  {multi_match: {fields: ["id", "name"], query: "test", "match_field_types": true}}</span>
<span class="pl-s">}<span class="pl-pds">'</span></span>  <span class="pl-c"><span class="pl-c">#</span> automatically remove 'id' from fields because of the incompatible type</span></pre></div>
<p dir="auto">The lenient option will control format based failure to be ignored (just as in <code class="notranslate">query_string</code> query).</p>