Obtaining stable SOLR ratings

I run a query to the SOLR core and limit the result using a filter like fq: {!frange l=0.7 }query($q) . I know that SOLR scores do not have an absolute value, but 0.7 (only an example) is calculated based on user input and some heuristics, which works quite well.

The problem is this: I am updating quite a few documents in my core. Updated fields are only metadata fields that are not associated with the above search. But since the update internally is delete + insert, IDF and doc count the change. And also calculated estimates. Suddenly my query returns different results.

As Jonick explained to me here , this is design behavior. So my question is: what is the easiest and minimum way to keep the results and results of my query stable?

Performing an optimization after each commit should solve the problem, but I'm wondering if there is anything simpler and cheaper.

+6
source share
1 answer

You really need to optimize your work. When you optimize the index solr, clear all documents that are not yet pointed and make the query stable. This is because collecting metadata data is expensive when all documents are updated. Because of this, solr just do this when optimizing. There is a good way to find out if your index is more stable ... When you access the Solr API, you can see the Num Docs and Max Doc . If Max Doc larger than Num Docs , it means that you have some old products that affect your relevance calculation. By optimizing the index, these two numbers become equal again. If these numbers are equal, you can trust that the IDF is correctly calculated.

+1
source

Source: https://habr.com/ru/post/988101/


All Articles