Elasticsearch provides a few built-in analyzers. Here’s a breakdown of each and where best to use it.
Disabling the Analyzer will store your data with no tokens and can only be searched by exact matches of the full text in the document.
The standard analyzer divides text into terms on word boundaries, as defined by the Unicode Text Segmentation algorithm. It removes most punctuation, lowercases terms, and supports removing stop words.
The simple analyzer divides text into terms whenever it encounters a character which is not a letter. It lowercases all terms.
The whitespace analyzer divides text into terms whenever it encounters any whitespace character. It does not lowercase terms.
The stop analyzer is like the simple analyzer, but also supports removal of stop words. The English stop words are:
a, an, and, are, as, at, be, but, by, for, if, in, into, is, it, no, not, of, on, or, such, that, the, their, then, there, these, they, this, to, was, will, with.
The keyword analyzer is a “noop” analyzer that accepts whatever text it is given and outputs the exact same text as a single term.
The pattern analyzer uses a regular expression to split the text into terms. It supports lower-casing and stop words.
Elasticsearch provides many language-specific analyzers like english or french.
The fingerprint analyzer is a specialist analyzer which creates a fingerprint which can be used for duplicate detection.