<p dir="auto">It's common case for continuous deployment to change elasticsearch's client and index independently. This leads to the case when <code class="notranslate">fieldValueFactorFunction</code> is added to the client but index is not rebuilt yet. I use <code class="notranslate">missing</code> property. Unfortunately <a href="https://github.com/elastic/elasticsearch/blob/528f6481eaadd2a0585dc6731a94d7a024b8ce29/src/main/java/org/elasticsearch/index/query/functionscore/fieldvaluefactor/FieldValueFactorFunctionParser.java#L89">FieldValueFactorFunctionParser</a> demands to have a field in a mapping, it throws exception otherwise. This means we can't deploy an client before index is updated despite having <code class="notranslate">missing</code> property set. The suggestion here is to look as <code class="notranslate">missing</code> in case of field in the document or mapping are missing.</p>
<p dir="auto">In the snippet below, index <code class="notranslate">analyzertest1</code> has an analyzer defined with <code class="notranslate">filters</code>, and <code class="notranslate">analyzertest2</code> - with <code class="notranslate">filter</code>. The latter works, the former doesn't (see also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="131365326" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/16451" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/16451/hovercard" href="https://github.com/elastic/elasticsearch/issues/16451">#16451</a>).</p>
<p dir="auto">When I specify filters inline, the situation is reversed: <code class="notranslate">filters</code> works, <code class="notranslate">filter</code> doesn't.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="post analyzertest1
  {
    &quot;settings&quot;: {
        &quot;analysis&quot;: {
            &quot;analyzer&quot;: {
                &quot;my_analyzer&quot;: {
                    &quot;tokenizer&quot;: &quot;standard&quot;,
                    &quot;filters&quot;: [&quot;lowercase&quot;]
                }
            }
        }
    }
  }

post analyzertest1/_analyze 
{
   &quot;analyzer&quot;: &quot;my_analyzer&quot;, &quot;text&quot;: &quot;ABCD&quot;
}
// Result: &quot;ABCD&quot;

post analyzertest2
  {
    &quot;settings&quot;: {
        &quot;analysis&quot;: {
            &quot;analyzer&quot;: {
                &quot;my_analyzer&quot;: {
                    &quot;tokenizer&quot;: &quot;standard&quot;,
                    &quot;filter&quot;: [&quot;lowercase&quot;, &quot;stop&quot;]
                }
            }
        }
    }
  }

post analyzertest2/_analyze 
{
   &quot;analyzer&quot;: &quot;my_analyzer&quot;, &quot;text&quot;: &quot;ABCD&quot;
}
// Result: &quot;abcd&quot;

post _analyze 
{
   &quot;tokenizer&quot;: &quot;standard&quot;,
   &quot;filter&quot;: [&quot;lowercase&quot;],
   &quot;text&quot;: &quot;ABCD&quot; 
}
// Result: error &quot;unknown parameter [filter]&quot;

post _analyze 
{
   &quot;tokenizer&quot;: &quot;standard&quot;,
   &quot;filters&quot;: [&quot;lowercase&quot;],
   &quot;text&quot;: &quot;ABCD&quot; 
}
// Result: &quot;abcd&quot;"><pre class="notranslate"><code class="notranslate">post analyzertest1
  {
    "settings": {
        "analysis": {
            "analyzer": {
                "my_analyzer": {
                    "tokenizer": "standard",
                    "filters": ["lowercase"]
                }
            }
        }
    }
  }

post analyzertest1/_analyze 
{
   "analyzer": "my_analyzer", "text": "ABCD"
}
// Result: "ABCD"

post analyzertest2
  {
    "settings": {
        "analysis": {
            "analyzer": {
                "my_analyzer": {
                    "tokenizer": "standard",
                    "filter": ["lowercase", "stop"]
                }
            }
        }
    }
  }

post analyzertest2/_analyze 
{
   "analyzer": "my_analyzer", "text": "ABCD"
}
// Result: "abcd"

post _analyze 
{
   "tokenizer": "standard",
   "filter": ["lowercase"],
   "text": "ABCD" 
}
// Result: error "unknown parameter [filter]"

post _analyze 
{
   "tokenizer": "standard",
   "filters": ["lowercase"],
   "text": "ABCD" 
}
// Result: "abcd"
</code></pre></div>