You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "mike.schultz" <mi...@gmail.com> on 2009/11/18 01:33:54 UTC

specifying search depth?

I want to use the standard QueryComponent to run a query then sort a *limited
number of the results* by some function query.  So if my query returns
10,000 results, I'd like to calculate the function over only the top, say
100 of them, and sort that for the ultimate results.  Is this possible?

Thanks
Mike
-- 
View this message in context: http://old.nabble.com/specifying-search-depth--tp26400097p26400097.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: specifying search depth?

Posted by Grant Ingersoll <gs...@apache.org>.
On Nov 17, 2009, at 7:33 PM, mike.schultz wrote:

> 
> I want to use the standard QueryComponent to run a query then sort a *limited
> number of the results* by some function query.  So if my query returns
> 10,000 results, I'd like to calculate the function over only the top, say
> 100 of them, and sort that for the ultimate results.  Is this possible?


I don't know of a way to do exactly what you want, but if you only cared about the score from the function and not the score from the query, you could move your query to be a filter and have the main query be your function.

Otherwise, you will probably have to write your own SearchComponent to operate on the results.  Or, I can see adding the capability to the response writer to, as it's streaming out docs, execute the functions.  That way, you'd avoid having to process the results too many times.

-Grant

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using Solr/Lucene:
http://www.lucidimagination.com/search