liveBook · Manning

Text analyzer

As explained in Elasticsearch in Action, Second Edition

A text-processing component that converts language-specific text into terms suitable for indexing or searching.

A text analyzer transforms language-specific text into tokens suitable for indexing and searching. Language analyzers can remove stop words and reduce related word forms through stemming. section 7.3.7 section 7.0

Language analyzers support practical search behavior through configurable processing:

  • Select analyzers for languages including English, German, Hindi, Spanish, French, and many others. section 7.3.7
  • Configure custom stop-word lists to avoid indexing common or unwanted terms. section 7.3.7
  • Use stemming to map forms such as author, authors, authoring, and authored to author. section 7.3.7
  • Exclude words such as authority and authorization when stemming would incorrectly reduce them to author. section 7.3.7

Testing a custom English analyzer

Create an analyzer with stop words ["a", "an", "is", "and", "for"], then send "A dog is for a life" to the _analyze API. The resulting tokens are dog and life, showing how configuration changes indexed terms.

How Elasticsearch in Action, Second Edition covers it

How deep it goes
Configures language analyzers, stop words, stemming, and stem exclusions, but does not detail analyzer internals.
Examples
Uses English, German, and Hindi input, custom stop words, author stemming, and stem exclusions for authority and authorization.
What you can do after
Operate/configure Elasticsearch language analyzers and test their token output through the _analyze API.
How it connects
Connects text analysis with tokenization, stop words, stemming, inverted indexes, and the _analyze API.

Also explained in

Compare how 2 books explain text analyzer →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elasticsearch in Action, Second Edition. The section links point to the parts of the book it draws on.