FAQ
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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedDec 12, '06 at 11:15a
activeDec 12, '06 at 11:15a
posts1
users1
websitelucene.apache.org

1 user in discussion

Maxim Patramanskij: 1 post

People

Translate

site design / logo © 2022 Grokbase