lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <lucenelist2...@danielnaber.de>
Subject Re: fuzzy search MultifieldQueryParser - Lucene 2.2
Date Fri, 26 Oct 2007 23:20:47 GMT
On Friday 26 October 2007 19:06, Zdeněk Vráblík wrote:

> It works if query string ends with ~, but how to switch it on for all
> query?

That's not supported AFAIK. You will need to iterate over the query 
(recursively if it's an instance of BooleanQuery) and create a new query 
where all parts are of type FuzzyQuery.

> I would like to search without fuzzy and if nothing is found I would
> like to search with fuzzy search.

I suggest you only do this if the user clicks on a kind of "make query 
fuzzy" link, or at least display clearly that the query is fuzzy now. 
Everything else could cause confusion. You might also want to consider 
using the spell checker.

Regards
 Daniel

-- 
http://www.danielnaber.de

---------------------------------------------------------------------
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