On Oct 7, 2005, at 11:17 AM, Sameer Shisodia wrote:
thnx Erik. Is returning a default constant the answer i'm looking for ?

Perhaps. Try returning 1.0f - experimentation is always warranted when playing with scoring tweaks. Have a look at IndexSearcher.explain() to see why documents score they way they do to help out with this. Luke makes this sort of thing easy to do.

    Erik


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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to