lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Kelvin <george.kelvin...@gmail.com>
Subject Re: Questions about FuzzyQuery in Lucene 4.x
Date Tue, 29 Jan 2013 17:28:07 GMT
Hi Jack,

ed is set to 1 here and I have lowercased all the data and queries.

Regarding the indexed data factor you mentioned, can you elaborate more?

Thanks!

George


On Tue, Jan 29, 2013 at 9:10 AM, Jack Krupansky <jack@basetechnology.com>wrote:

> That depends on the value of "ed", and the indexed data.
>
> Another factor to take into consideration is that a case change ("Star"
> vs. "star") also counts as an edit.
>
> -- Jack Krupansky
>
> -----Original Message----- From: George Kelvin
> Sent: Tuesday, January 29, 2013 11:49 AM
> To: java-user@lucene.apache.org
> Subject: Re: Questions about FuzzyQuery in Lucene 4.x
>
>
> Hi Jack,
>
> Thanks for your reply!
>
> I don't think I passed the prefixLength parameter in.
>
> Here is the code I used to build the FuzzyQuery:
>
>            String[] words = str.split("\\+");
>            BooleanQuery query = new BooleanQuery();
>
>            for (int i=0; i<words.length; i++)
>            {
>                Term t = new Term(field, words[i]);
>                FuzzyQuery fq = new FuzzyQuery(t, ed);
>                query.add(fq, BooleanClause.Occur.MUST);
>            }
>
>            int k = 10;
>            TopDocs results = searcher.search(query, k);
>
> Does it look right to you?
>
> Thanks!
>
> George
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.**apache.org<java-user-unsubscribe@lucene.apache.org>
> For additional commands, e-mail: java-user-help@lucene.apache.**org<java-user-help@lucene.apache.org>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message