lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: How to boost records based on score than a custom field rank (double field)
Date Mon, 23 Mar 2015 17:34:07 GMT
Function queries are built for this, see:
https://cwiki.apache.org/confluence/display/solr/Function+Queries, the
_val_ trick (that's underscore-val-underscore in case italics happen).

You can also wrap that value in any of the other functions.

Best,
Erick

On Mon, Mar 23, 2015 at 7:58 AM, Umang Agrawal <umang.in60@gmail.com> wrote:
> Hi All
>
> How can we boost the solr records at query time based on score (calculated
> by solr search engine) then by a custom field rank (a double field
> available in record).
>
> I have dolr documents containing fields "id", "title", "headline",
> "summary", "rank".
> Where
>     id is string
>     title is string
>     headline is string
>     summary is string
>     rank is double
>
> Score calculated by:
>     query field (qf) = title^10 headline^5 summary^1
>
> I want to boost the records based on score and rank.
>
> I tried with sort by score (desc) then rank (desc) but it's not working as
> expected, since sorting remove the score assignment by solr search engine.
>
> --
> Thanx & Regards
> Umang Agrawal

Mime
View raw message