O'Reilly logo

Mastering Apache Solr 7.x by Dharmesh Vasoya, Chintan Mehta, Sandeep Nair

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How text analysis works

We have seen an overview of Solr's text analysis; now let's learn how Solr actually implements the analysis process. Here are the common steps normally used by Solr in an analysis process:

  • Removing stop words:
    • Stop words (common letters/words) such as a, an, the, at, to, for, and so on are removed from the text string; so Solr will not give results for these common words. These words are configured in a text file (for example, stopwords_en.txt) and this file needs to be imported in the analysis configuration.
  • Adding synonyms:
    • Solr reads synonyms from the text file (synonyms) and adds them to the token stream. All synonyms need to be preconfigured in the text file, such as Football and SoccerCountry and Nation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required