lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Nentwig <tnent...@jamba.net>
Subject FuzzyQuery using termDocs() for context filtering
Date Mon, 05 Nov 2007 13:33:17 GMT
Hi!

Imagine an index holding documents in different languages and country. 
Language+country is what I call a context and I build and hold a QueryFilter 
for each context.

When performing a fuzzy search, FilteredTermEnum doesn't care about any 
contexts at all (well, how should it :). It builds a BooleanQuery of all 
terms that come into question.

I came up with the idea to reimplementing FuzzyTermEnum to use 
reader.termDocs() instead of reader.terms(). This way for each term I know 
which document it comes from and by means of the above mentioned QueryFilter 
I can decide whether the term is valid for the given context or not.

This results (potentially) in a smaller BooleanQuery but I wonder whether this 
approach will gain any mentionable performance advantage (maybe reduce IO?).

Timo

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


Mime
View raw message