lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <>
Subject Re: Similarity coefficient for more exact matching
Date Fri, 27 Apr 2012 13:29:44 GMT
You can override
to tweak quite a lot of stuff.

computeNorm() may be the method you are interested in.  Called at
indexing time so be sure to use the same implementation at index and
query time, using IndexWriterConfig.setSimilarity() and
IndexSearcher.setSimilarity(), unless you are clever or like being

SweetSpotSimilarity might also be worth a look.


On Fri, Apr 27, 2012 at 1:18 PM, Maxim Terletsky <> wrote:
> Hi guys,
> I have a field, Anayzed, Store.No.
> Suppose one Document with value inside this field "Hello".
> Another one "Hello world , one, two, three, four".
> Since the field is Analyzed (with norms), the "one two three four) will definitely affect
the resulting rating in case we search for "Hello world" query. Does anyone know whether I
can control some coefficients to determine what is the weight for exact matching vs. amount
of worlds (the norm factor)?
> Thanks,
> Maxim

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

View raw message