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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Sameer Shisodia Bangalore (c) +91-98451-80207 [EMAIL PROTECTED]