FAQ

On Dec 15, 2007 2:23 PM, Timo Nentwig wrote:
On Saturday 15 December 2007 00:17:10 Chris Hostetter wrote:
: Actually FuzzyQuery.rewrite() is pretty expensive so why not introduce a
: caching decorator? A WeakHashMap with key==IndexReader and value==LRU of
: BooleanQueries.

Applications are certainly welcome to do this (there is nothing to stop
you from calling rewrite before passing the query to your Searcher, i
believe the overhead of calling rewrite on a query that's already been
rewritten is fairly low) but I don't think it would be a good idea to add
Why should subsequent rewrites be faster?
Hoss means calling rewrite on the *result* of a rewrite.
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.

-Yonik

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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 8 | next ›
Discussion Overview
groupdev @
categorieslucene
postedDec 11, '07 at 12:28p
activeSep 6, '08 at 6:56p
posts8
users3
websitelucene.apache.org

People

Translate

site design / logo © 2021 Grokbase