lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Caching FuzzyQuery
Date Sun, 16 Dec 2007 17:21:39 GMT

: > Hoss means calling rewrite on the *result* of a rewrite.
: Uh? That's what I mean (propose), too... But currently nothing's cached at 
: all.
: Cache the result (BooleanQuery) of rewrite() in a WeakHashMap with key = 
: IndexReader and value = LRU.

yes .. you can do that.  you don't need anything in the core lucene 
Searchers to do it for you (ie: nothing needs refactored out, because 
redundent rewrite calls are cheap) ... in the paragraph below, 
"application" refers to your code, "Lucene" refers to the code in the 
lucene JAR...

: > So the application would call rewrite, cache the resulting query, and
: > then use that already rewritten query from then on.  Lucene wouldn't
: > know it had already been rewritten, and would call rewrite again, but
: > it should be fast.


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

View raw message