Apache Solr works

Indexing

  • Apache Solr is capable to get quick search responses because, as a replacement for searching the text directly, it searches an index instead.
  • It stores index in a directory called index in the data directory.
how apache solr works

Working:

  • The Apache Solr creates inverted index of the documents that are posted in to its collection or core.
  • Core or collection is just part entity which can be used to post documents and running queries on that set of documents.
  • Inverted index is a main term in the domain of Information Retrieval and Natural Language Processing.
  • Now take a document, note down all the unique words appearing in that document as well as note the frequency of the words. Hence the inverted index is ready.
  • Solr creates similar inverted index of the documents posted to its core using a defined schema.
  • Schema is a blue print which helps Solr in creating inverted index of the documents by giving a set of predefined fields in the schema.xml file.
  • Once Solr completes indexing the documents posted to its core or collection it can be used to run queries.
solr work
  • Now a user can query Solr for related documents using its query parser or admin panel.
  • When a query is given to Solr, it breaks the query into different chunks or entities and matches it with the inverted index of the documents created previous.
  • The documents obtained accordingly of a Solr search is based on the same class and other constraints defined in its schema.xml and solr.config file.

Categorized in:

Tagged in:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,