lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Question on custom scoring
Date Tue, 14 Aug 2007 20:23:08 GMT

: [1] I need to rank matches by some combination of keyword match, popularity
: and recency of the doc. I read the docs about CustomScoreQuery and seems to
: be a resonable fit. An alternate way of achieving my goals is  to use a
: custom sort. What are the trade-offs between these two approaches?

it's kind of an apples vs orange juice question -- CustomScoreQuery is
about influencing the scores matching documents get as they are collected,
custom sorting is about ordering the results of a search by an arbitrary
criteria after they are collected.  if you want to write some code that
can generally be reusable for influencing hte score no matter what other
types of queries (or boosts on those queries) it's combined with, that
would be a CustomScoreQuery -- if you want to write something that will
give you docs in a particular ordering no matter what kind of underlying
query/boosts are used, that's a custom sort.

the tradeoffs are your goals.

: [b] The subQueryScore that is returned in the customScore() API doesnt seem
: to be normalized. This makes it difficult for me to weight the different
: scores properly. Is there an easy way to get the normalized "text index"
: score in customScore() API so I can easaily weigh in the other factors
: relative to it?

normalized relative to what?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message