Thanks for your response..

 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris Hostetter
Sent: Tuesday, December 07, 2004 11:26 AM
To: Lucene Users List
Subject: Re: Filter !!!

 

 

:  Hits hits = indexSearcher.search(searchQuery, filter)   //  here I
want

: to pass multiple filter...  (DateFilter,QueryFilter)

 

You can write a Filter that takes in multiple filters and ANDs them

together (or ORs them, it's not clear what you want)

 

   Hits h = s.search(q,new AndFilter(df,qf));

 

...

 

class AndFilter {

   final Filter a;

   final Filter b;

   public AndFilter(Filter a, Filter b) {

     this.a = a;

     this.b = b;

   }

   BitSet bits(IndexReader r) {

     return b.bits(r).and(a.bits(r));  // Correct this line I am getting
some error.

   }

}

 

 

(I'm planing on writting a generalized "BooleanFilter" class sometime

in the next few weeks)

 

-Hoss

 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to