lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sameer Shisodia <get.sam...@gmail.com>
Subject Re: Field length normalization
Date Fri, 07 Oct 2005 15:17:57 GMT
thnx Erik. Is returning a default constant the answer i'm looking for ?
btw, the book is kewl :)
sameer

On 10/7/05, Erik Hatcher <erik@ehatchersolutions.com> wrote:
>
>
> On Oct 7, 2005, at 4:14 AM, Sameer Shisodia wrote:
>
> > Hi,
> > Have started using Lucene recently so this might be a oft repeated
> > qn (Do point me to archives if any).
> > I'm storing multiple values of a field as a comma separated string
> > during indexing.
> > Obviously, some docs have more values and some only one and
> > so hits against those with multiple values for the field suffer.
> > Is there are trivial way of changing this without writing my own
> > version Similarity() completely ?
>
> Sure, you can subclass DefaultSimilarity and override and tweak just
> the lengthNorm() method. Be sure to use IndexWriter.setSimilarity()
> to get your custom one used.
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


--
Sameer Shisodia Bangalore
(c) +91-98451-80207
get.sameer@gmail.com

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