: Yes I do so. The Problem ist that the collect-Method is called for EVERY 
: document the query matches. Even if the User only wants to see like 10 
: documents. The Operation I have to perform takes maybe 50ms/per document 

You running into a classic chicken/egg problem with document collection 
& filtering -- you don't want your expensive filte to be run against every 
doc that matches the query (and lower cost filters) just the "top 10" the 
user is going to see -- but solr doesn't know what those top 10 are yet, 
not untill it's collected & sorted all of them ... nad your PostFilter 
can change what gets collected ... it's a filter!

Also: Things like Faceting (and even just returning an accurate numFound!) 
require that all matches be "collected" ... unless you are useing sorted 
segments and early termintation, your PostFilter has to be consulted about 
every (potential) match in order for the results to be accurate.

: if have to process them singel. And maybe 30ms if I could get a 
: Document-List. But if the user e.g. uses an Wildcard query that matches 

If processing in batch is a viable option then, one approach you may want 
to consider is to take the approach used by the CollapseQParser and the 
PostFilter it generates -- it doesn't pass on any collected documents to 
it's delegate as it collects them -- it essentially just batches them all 
up, and then in the "finish" method it processes them and calls 
delegate.collect() on the ones it decies are important.

-Hoss
http://www.lucidworks.com/

Reply via email to