Search code examples
elasticsearch

What is the difference between standard and language analyzer in Elasticsearch?


How much will the search improve? For example, if compare standard with Spanish (or any other).


Solution

  • Language analyzers are tuned for specific languages while the standard analyzer is language-agnostic but is said to "work pretty well for most languages".

    You should go through the following documentation page https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-lang-analyzer.html which explains the language analyzers in more details.

    The standard analyzer just uses:

    The spanish analyzer does what the standard one does, and adds three more token filters:

    • spanish_stop
    • spanish_keywords
    • spanish_stemmer

    So if you know you have spanish text to analyze and you will need to create relevant free-text searches for your users, then I'd go with the spanish analyzer