You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by aaz <x...@interoperate.com> on 2005/01/26 00:57:28 UTC

multiple filters

Hello,
Every document in my index has 2 date related fields.

created_date and modified_date stored via the DateField.dateToString()

Users want to be able to search via such between like queries such as:
(where modified_date > X AND modified_date < X AND created_date >= created_date =< X)

Now I tried using RangeQuery's for this but quickly ran into the TooManyClauses exception issue. The next thing I am looking at is the use of DateFilters to pass in with the query at searcher.search(). However the interfaces only supports one filter. Is it possible to pass multiple filters that would be needed for my example above?

thanks




Re: multiple filters

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
There is a ChainedFilter in the jakarta-lucene-sandbox CVS repository 
allowing you to AND/OR/XOR, and more with multiple filters.  I covered 
it in LIA:

	http://www.lucenebook.com/search?query=ChainedFilter

And the source code you can download has some code that demonstrates it.

	Erik

On Jan 25, 2005, at 6:57 PM, aaz wrote:

> Hello,
> Every document in my index has 2 date related fields.
>
> created_date and modified_date stored via the DateField.dateToString()
>
> Users want to be able to search via such between like queries such as:
> (where modified_date > X AND modified_date < X AND created_date >= 
> created_date =< X)
>
> Now I tried using RangeQuery's for this but quickly ran into the 
> TooManyClauses exception issue. The next thing I am looking at is the 
> use of DateFilters to pass in with the query at searcher.search(). 
> However the interfaces only supports one filter. Is it possible to 
> pass multiple filters that would be needed for my example above?
>
> thanks
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org