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.i...@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

Reply via email to