- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 179字
- 2021-06-24 14:52:13
How it works...
The concept of the analyzer comes from Lucene (the core of Elasticsearch). An analyzer is a Lucene element that is composed of a tokenizer that splits a text into tokens, as well as one or more token filter. These filters carry out token manipulation such as lowercasing, normalization, removing stop words, stemming, and so on.
During the indexing phase, when Elasticsearch processes a field that must be indexed, an analyzer is chosen, first checking whether it is defined in the index_analyzer field, then in the document, and finally, in the index.
Elasticsearch provides several analyzers in its standard installation. In the following table, the most common ones are described:
For special language purposes, Elasticsearch supports a set of analyzers aimed at analyzing text in a specific language, such as Arabic, Armenian, Basque, Brazilian, Bulgarian, Catalan, Chinese, CJK, Czech, Danish, Dutch, English, Finnish, French, Galician, German, Greek, Hindi, Hungarian, Indonesian, Italian, Norwegian, Persian, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, and Thai.