lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark harwood <>
Subject Re: FuzzyLikeThisQuery what does maxNumTerms mean
Date Wed, 09 May 2007 17:21:17 GMT
FuzzyLikeThis is effectively the same as MoreLikeThis but adds fuzzy variations for the selected

>>Will it only use the first 3 terms or what?

It works the same way as MoreLikeThis in that it is selective about which input terms are
used for querying - words like "the" will typically get ignored.
So, given the input terms "accommodation in the Brecon beacons" the terms selected for querying
are likely to be:

    accommodation - accomodation - accommadation - accomadation
    brecon - breacon - breckon - bracken
    beacons - beacon

This list of terms is then is shortlisted to the maxNumTerms value.

Unlike standard FuzzyQuery the rare term variations (i.e. the misspellings) will not be boosted
above the hopefully more common correct spelling due to their IDF.

Hope this makes sense.


----- Original Message ----
From: bhecht <>
Sent: Wednesday, 9 May, 2007 4:46:29 PM
Subject: FuzzyLikeThisQuery what does maxNumTerms mean

Hello all,

I am new to lucene and want to use the FuzzyLikeThisQuery.

I have read the documentation for this class, and read the following for
what maxNumTerms means:
"maxNumTerms - The total number of terms clauses that will appear once
rewritten as a BooleanQuery".
In addition in the classes documentation it reads:
"Fuzzifies ALL terms provided as strings and then picks the best n
differentiating terms"

1) I want to understand if the meaning of  "n" in "the best n
differentiating terms" refers to maxNumTerms .
2) I want to understand how does this number affect the query built for this
FuzzyLikeThisQuery fuzzyLikeThisQuery = new FuzzyLikeThisQuery(3, new
fuzzyLikeThisQuery.addTerms("tem1 term2 term3 term4", fieldName, 0.75f, 2);

If the number of maxNumTerms = 3, how will this affect the query built. Will
it only use the first 3 terms or what?

Thanks in advance.

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

Yahoo! Answers - Got a question? Someone out there knows the answer. Try it

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

View raw message