lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WolfgangTäger <>
Subject Re: Performance problem, Search within search for TopDocs ?
Date Thu, 25 Aug 2005 07:14:25 GMT
Hello Paul, hello Doug,

many thanks for your help !!

@Paul: I didn't try your method, Paul, because I feared that retrieving 
all hits would not solve my problems, because the number of hits may be 
many times higher than the 2000 I wanted for my statistics.

@Doug: I tried your method which is extremely fast !

The first run is still very slow (many seconds, but this is not a problem 
for me), measuring the following ones sometimes gives 0ms  using 
currentTimeMillis() !!

Now I have one more question: I want to use the TopDocs result 

TopDocs hits =, (Filter)null, 2000);

as a filter for following queries like

DE:Schlüssel            limited to the 2000 TopDocs for the query "key"

AFAIK, the recommended way for search within a search is:
Combine the previous query with the current query using BooleanQuery, 
wherein the previous query is marked as required.

Can this be done in this case ? My query does not contain any information 
that I want 2000 results as maximum.
Note: I do not want to limit the combined query to 2000, but typically I 
expect fewer results by first restricting the "key" query to 2000 and then 
looking in the results for DE:"Schlüssel".



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message