lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shah, Vineel" <>
Subject custom scoring api questions
Date Tue, 31 Dec 2002 01:12:31 GMT
I've been developing a search function with Lucene for a couple of weeks (it's wonderful!)
I've run into a snag-- the way I need to calculate scores seems to have nothing to do with
Lucene's scoring paradigm. I think this is because I'm doing a database-oriented search instead
of a document-oriented

I tried the new Similarity custom scoring api from build 1.34. Turns out, it's not "custom"
enough. :-) It assumes that I want scores normalized 6 ways from sunday, based on dozens of
things such as where terms are in the query and how many times the term is used in the document.
Great stuff all,
but I need something way simpler.

So my question -- what do I override to simplify my search? I'm getting lost in the source.
Any pointers would be appreciated.

Here's what I'm trying to do:
A query that looks for for "java unix windows" in the "keywords" field of an index.

If the document has "java unix", the score is .66..., regardless of any other factor. I want
1.0 for all three, .33... for just one, and no hit for none.

I'm thinking I'll need to extend TermQuery and TermScore, and maybe BooleanQuery and BooleanScore.
Does that make any sense?

Forgive me if I'm posting on the wrong list. No one has even mentioned the custom scoring
stuff on lucene-user.

Vineel Shah

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