lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Re: Getting irrelevant results using fuzzy query
Date Wed, 18 Jun 2008 18:37:58 GMT
On Mittwoch, 18. Juni 2008, László Monda wrote:

> Since fuzzy searching is based on the Levenshtein distance, the distance
> between "coldplay" and "coldplay" is 0 and the distance between
> "coldplay" and "downplay" is 3 so how on earth is possible that when
> searching for "coldplay", Lucene returns "longplay"?

You can use query.explain() to get the details of the ranking. In your 
case, just build a query like: term^100 OR term~, i.e. boost the original 
(non-fuzzy) term with a large number.



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

View raw message