Hi Erik Can u please tell me how to use this query in loop because he can refine the search n number of time so how to maintain all the queries in QueryFilter and use of them ,,,,, Please help me I need very urgent.
Thanks Ravi Kumar Jaladanki -----Original Message----- From: Erik Hatcher [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 7:12 PM To: java-user@lucene.apache.org Subject: Re: :intersection of two hits objects: On Jan 18, 2006, at 8:20 AM, Ravi wrote: > > I want to find out the intersection of two hits objects please > help me > > > > > > Hits hits1 = Searcher.searh(strQuery1); > > Hits hits2 = Searcher.searh(strQuery2); > > > > > > Now In hits1 contains records numbers 3,4 ,5,6 and > > Hits2 contains records numbers 3,6,8,9 > > Now I need a solution which can give the hits object which > contains 3,6 > records One option is to construct a QueryFilter with the first query, and use the search(Query, Filter) method. Another option is to AND the two queries together by wrapping them in a BooleanQuery with both clauses required. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]