Mailing List Archive

[Solr] does not use the filterCache
Hi,
I was taking a look at the Solr searcher to see how the filterCache is
used:
https://github.com/apache/solr/blob/c2db3a943e665cfb39e9ea53640be40cf2c09fbc/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L1379-L1398
Reading the code, it turned out that the filterCache is not used if the
sort contains the score or if we don't have any score specified (by
default, it sorts by score).
As far as I know, the filterCache contains an unordered set of documents so
the sort must be calculated after the application of the filter query.
Then, also the score should be computed after the filter query to have a
smaller set of documents.
That being said, I don't understand why Solr does not use the filterCache
if the score is somehow involved in the sort.
In theory, it can

1. apply the filter query reducing the number of result
2. computes the score
3. sort the results

Am I missing something?

Happy new year,
Daniele