<p dir="auto">One of the nice features of the simple query parser is that it is possible to only enable certain operators. It allows to do quite interesting things.</p>
<p dir="auto">For example, if you are using the keyword analyzer and disable the whitespace operator, <code class="notranslate">the fox | jumped over</code> would be parsed into <code class="notranslate">the fox</code> OR <code class="notranslate">jumped over</code> (<code class="notranslate">the fox</code> would actually be treated as a single token).</p>
<p dir="auto">One could also prevent users from running too expensive queries that could kill the cluster such as prefix queries.</p>
<p dir="auto">The <code class="notranslate">simple_query_string</code> query allows the user to enable/disable parts of the syntax, eg prefixes, phrases etc.</p>
<p dir="auto">I think it makes sense to support the full syntax by default, but to allow the user to disable the parts that they don't want, eg:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;simple_query_string&quot;: {
    &quot;query&quot;: &quot;....&quot;,
    &quot;disable&quot;: &quot;PREFIX|PHRASE&quot;
}"><pre class="notranslate"><code class="notranslate">"simple_query_string": {
    "query": "....",
    "disable": "PREFIX|PHRASE"
}
</code></pre></div>
<p dir="auto">... in a similar way that we do with <code class="notranslate">flags</code> in the regexp query/filter</p>