dcsimg
Restrict number of hits for following search within search
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, June 16, 2005 04:59 AM

Dear all I want to statistically analyse the result of a query Q1 by doing a search within a search (Queries Q2f, Q3f, ... obtained using FilteredQuery on Q2, Q3, ... restricted to Q1). Unfortunately the number of hits may be so large that the process takes too long (not Lucene but my processing afterwards...). Therefore I'm searching for a way to limit the number of results of the first query Q1 so that I get a suitable QueryFilter. Code: Filt=new QueryFilter(Q1); Q2f= new FilteredQuery(Q2,Filt); wanted (int n gives the max number of results): Filt=new QueryFilter(Q1,n); Q2f= new FilteredQuery(Q2   More>>

Dear all


I want to statistically analyse the result of a query Q1 by doing a search within a search (Queries Q2f, Q3f, ... obtained using FilteredQuery on Q2, Q3, ... restricted to Q1).


Unfortunately the number of hits may be so large that the process takes too long (not Lucene but my processing afterwards...).


Therefore I'm searching for a way to limit the number of results of the first query Q1 so that I get a suitable QueryFilter.


Code:

			
Filt=new QueryFilter(Q1);
Q2f= new FilteredQuery(Q2,Filt);



wanted (int n gives the max number of results):

			
Filt=new QueryFilter(Q1,n);
Q2f= new FilteredQuery(Q2,Filt);



Any help will be welcome. I know there is TopDocs but I don't know if I can use it. If necessary I can recompile the source.


PS: Getting just the first n docs of each result does not help because the hits of Q2f, ... need to be a subset of the hits of Q1.

   <<Less
About | Sitemap | Contact