arjunsv3691
arjunsv3691

Reputation: 829

Solr search relevancy impact

I have a MySQL database from which I sync data to solr everyday and my webapp queries the data from solr frequently. I don't have backup enabled in my solr cluster. if in case I shutdown existing cluster and want to create new cluster and populate data into solr from MySQL, will the search result be same as what I used to get from previous cluster.

Since I have been querying the old cluster from last one year does solr store any internal info about frequently searched terms and docs, increase it's popularity score ? , or it doesn't make any difference if I just create new cluster the search results would be same.

Upvotes: 0

Views: 121

Answers (1)

MatsLindh
MatsLindh

Reputation: 52792

Solr does not store any query history or uses popular searches or results to affect scores (think of it this way: the result Solr delivers is already scored according to the factors given in the query; using that data to change scoring wouldn't affect anything, since the data is already presented in the same way). You can use external signals (clickstreams, etc.) to change scoring yourself by having that data in other fields, but that is up to you as a developer.

Regarding the first part of your question; the search result will be the same-ish. If two documents are scored the same, their individual order is determined by their order in the Lucene index. If that order changes after reindexing, you'll potentially see documents with identical score having their place in the search result switched around.

Another factor is that if you haven't optimized your index recently (either manually or through a merge factor), the score might also change if you have many deleted documents in your index. Deleted documents are still considered when calculating the score, but after an optimize or merge these are removed from the index and no longer affect the score.

Upvotes: 1

Related Questions