How Solr works

The easiest way to understand how Solr works is to see how a telephone directory helps you to look something up. A telephone directory, or yellow pages as it is called in some places, is a book containing lots of phone numbers. It has lots of pages. Now, to find information in it would be a humongous task unless it had some sort of indexing and categorizing. For example, we can easily find all the restaurants by just navigating to the category of restaurants and finding the locality that we are living nearby.

Similarly, Solr can be imagined as a huge directory that has been fed data as per our requirement, and it can be queried to get the relevant data by using an appropriate search criteria that was indexed while feeding in the data. Let's have a look at the following diagram and understand how Solr search platform works:

As you can see, the way to look at Solr is like this—it is basically fed with lots of information, which is correctly indexed. Then, in order to retrieve information, we query based on the index and get our results.

Suppose I am designing a data store for the world's largest online library using Solr. What I do is feed Solr with each book's information, such as the title, published date, author, price, genre, and so on. So, when I query all the books written by J.K. Rowling in the child fiction genre, it returns me my favorite Harry Potter book series.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.113.80