lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantyn Smirnov <>
Subject Incremental search, CachingWrapperFilter and BooleanFilter
Date Thu, 19 Feb 2009 10:03:48 GMT

Hi all

I implemented an autocomplete functionality, which is pretty classical: a
user types in some words in an input field, and sees a list of matches in a

I've done it using filters (BooleanFilter, and TermsFilter + PrefixFilter),
and it's working against and index (loaded in RAM) with 3+ mio documents
with avg. time of 150-300 ms. 

The resulting filter instance looks like:

termsFilter + termsFilter + prefixFilter (the right part is left *open*)

Now I wanna try optimizing the whole thing by providing a possibility of
incremental search with the caching of a previous filter's results with

AFAIK, you cannot modify a CWF, once it's filled. 

How a following scenario can be implemented?

- a user types 'aaa bbb' in, then adds 'ccc'. How to cache results of 'aaa
bbb' and the apply 'ccc'-filter to it and cache the new filter again?

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message