Reputation: 14645
I understand semantics: first we execute query and then we apply filters as DocIdSets(tring to get them from cache).
For some queries it is very inefficient, for example if main query is complex double function of all documents(sqrt(popularity) + distance(...)), at first I will evaluate this function for all index and then filter it...
Is there a way to run original query on filtered doc id set?
Upvotes: 2
Views: 1607
Reputation: 9964
first we execute query and then we apply filters as DocIdSets(tring to get them from cache).
This is not true, Solr only computes the required scores, meaning that if any filter doesn't match a document, the score for this document won't be computed.
However it is true that it requires to perform disk accesses. In order to prevent this, Solr has the useFilterForSortedQuery option that will first fetch the DocSet in the cache if available and then sort it in memory. I guess that it is what you were looking for.
Upvotes: 1