: 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to