You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by heikki <tr...@gmail.com> on 2013/02/08 11:41:02 UTC

Custom score question

hello,

I have the following question:

is it possible to combine the result of a custom score, with the normal
relevance ranking score ?

We'd like to have a scoring where documents that have a "title" field that's
the same as the "title" of many other documents, are ranked lower. But
without losing the usual relevance ranking score--just influence it a bit.

I suppose I could make a CustomScoreQuery that calculates something based on
frequency of titles, but I don't see how that than might be combined with
the default ranking score.

Does anyone have a suggestion ?

Kind regards
Heikki Doeleman



--
View this message in context: http://lucene.472066.n3.nabble.com/Custom-score-question-tp4039206.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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


Re: Custom score question

Posted by Ian Lea <ia...@gmail.com>.
The score from the main query is passed to the customScore() methods
of CustomScoreProvider so you can tweak that as you will.  Or, easier,
use document boosting to set a low boost for common titles.  How are
you going to determine if a title is common or not?

Lucene by default will tend to favour rarer terms - maybe you can
achieve the same result more easily by using/tweaking an alternative
Similarity implementation.


--
Ian.


On Fri, Feb 8, 2013 at 10:41 AM, heikki <tr...@gmail.com> wrote:
> hello,
>
> I have the following question:
>
> is it possible to combine the result of a custom score, with the normal
> relevance ranking score ?
>
> We'd like to have a scoring where documents that have a "title" field that's
> the same as the "title" of many other documents, are ranked lower. But
> without losing the usual relevance ranking score--just influence it a bit.
>
> I suppose I could make a CustomScoreQuery that calculates something based on
> frequency of titles, but I don't see how that than might be combined with
> the default ranking score.
>
> Does anyone have a suggestion ?
>
> Kind regards
> Heikki Doeleman
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Custom-score-question-tp4039206.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

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