lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Custom hit score
Date Wed, 05 Apr 2006 05:28:57 GMT

: I want to have a simple hit score for every document where the query has been
: found. E.g. if the query word was found 3 times in a document, this doc
: should have 100% score, next document with 2 times should have 90% and so

you haven't defined the scoring mechanism you want to use very clearly,
especially in cases of multi clause queries, but you should start by
writing your own Similarity subclass that returns a constant value for
everything but the tf(float) function -- for that return the same value as
the input.

that should be a pretty good start towards the simplest scoring mechanism
possible for ranking documents by the number of times words match ...
beyond that you'll wnat to read more in depth about similarity and study
the the Explanation output from some sample queries to make sense of
what's goming on.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message