lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Caching FuzzyQuery
Date Fri, 14 Dec 2007 23:17:10 GMT

: 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 
something like this to the core ...for starters we are trying to move 
away from "hidden" caches like this that are not transparent (and 
controllable) but the users because they have the potential to eat up a 
lot of ram.  But also: he amount of time needed to rewrite the query is 
probably not vastly more expensive then the anout of time to execute the 
search .. you might as well cache the entire result keyed off of the 
orriginal query (and not just the rewritten query object).


-Hoss


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


Mime
View raw message