lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Single filter instance with different searchers
Date Wed, 03 Nov 2010 13:34:12 GMT
I'm assuming you're down in Lucene land. Unless somehow you've
gotten 63 separate filters when you think you only have one, I don't
think what you're doing will work. Or I'm failing to understand what
you're doing at all.

The problem is I expect each of your indexes starts with document
1. So your Filter is really a bit set keyed by Lucene document ID.

So applying filter 2 to index 54 will NOT do what you want. What I
suspect you're seeing is that applying your filter is producing enough
results from index 54 (to continue my example) to fool you into
thinking it's working.

Try running the query with and without the filter on each of your indexes,
perhaps as a control including a restrictive clause in the query
to do the same thing your filter is doing. Or construct the filter new
for comparison.... If the numbers continue to be the same, I clearly
don't understand something! <G>....


On Wed, Nov 3, 2010 at 6:05 AM, Samarendra Pratap <>wrote:

> Hi. We have a large index (~ 28 GB) which is distributed in three different
> directories, each representing a country. Each of these country wise
> indexes
> is further distributed on the basis of last update date into 21 smaller
> indexes. This index is updated once in a day.
> A user can search into any of one country and can choose last update date
> plus some other criteria.
> When the server application starts, index readers and hence searchers are
> created for each of the small indexes (21 x 3) and put in an array.
> Depending on the option (country and last update date) chosen by user we
> pick the searchers of correct date range/country and create a new
> ParallelMultiSearcher instance.
> Now my question is - can I use single filter (caching filter) instance for
> every search (may be on different searchers)?
> ===================================================================================
> e.g
> for first search i create an filter of experience 4 years and save it.
> if another search for a different country (and hence difference index) also
> has same experience criteria, i.e. 4 years, can i use the same filter
> instance for second search too?
> i have tested a little for this and surprisingly i have got correct
> results.
> i was wondering if this is the correct way. or do i need to create
> different
> filters for each searcher (or index reader) instance?
> Thanks in advance.
> --
> Regards,
> Samar

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message