Configuring built-in analyzers
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
Generally available
The built-in analyzers can be used directly without any configuration. Some of them, however, support configuration options to alter their behavior. For instance, the standard analyzer can be configured to support a list of stop words:
PUT my-index-000001{ "settings": { "analysis": { "analyzer": { "std_english": { "type": "standard", "stopwords": "_english_" } } } }, "mappings": { "properties": { "my_text": { "type": "text", "analyzer": "standard", "fields": { "english": { "type": "text", "analyzer": "std_english" } } } } } }POST my-index-000001/_analyze{ "field": "my_text", "text": "The old brown cow" }POST my-index-000001/_analyze{ "field": "my_text.english", "text": "The old brown cow" }
- We define the
std_englishanalyzer to be based on thestandardanalyzer, but configured to remove the pre-defined list of English stopwords. - The
my_textfield uses thestandardanalyzer directly, without any configuration. No stop words will be removed from this field. The resulting terms are:[ the, old, brown, cow ] - The
my_text.englishfield uses thestd_englishanalyzer, so English stop words will be removed. The resulting terms are:[ old, brown, cow ]