lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxim Patramanskij <...@osua.de>
Subject Complex query filtering
Date Tue, 12 Dec 2006 11:15:08 GMT

I need to apply a set of custom filters to my query.
One of the filters, which optionally can be applied, is a filter by
date range.

For the moment I'm using a BooleanQuery approach for this.
I know that it is not the best from the score accuracy nor performance
point of view and I want change this to use FilteredQuery approach.

I' assuming the following approach to re-implement current state:

1. For all the filters, excluding filter by date, I still create a
BooleanQuery.

2. For filtering by date, I create  RangeFilter and wrap it around
with a ConstantScoreQuery.

3. Create a new BooleanQuery from the queries, obtained on 1 and 2 step

4. Create a QueryFilter from the BooleanQuery, created on step 3.

5. Use FilteredQuery, created from user query and QueryFilter(or even surrounded
with CachingWrapperFilter for better performance), created on previous step.


Would this solution be the best approach for constructing overall filter?

Thanks in advance,
Max


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


Mime
View raw message