在按字段结果排序的顶部获取Solr提升的结果 [英] Getting Solr Elevated Results on top of Sorted by field Results

查看:105
本文介绍了在按字段结果排序的顶部获取Solr提升的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Solr5.我们能够对显示顺序字段中的排序应用到Solr查询中,并且工作正常.我们取得了一定的成果,并且总是会首先要求他们.如果我们删除排序,则高程工作正常.但是,我们无法使它们一起工作.

We are using Solr 5. We are able to apply sorting on display order field in to Solr query and it works fine. We have certain results which are elevated and will always want them first. If we remove the sorting, the elevation works fine. However, we are unable to get both of them work together.

我们要首先在顶部列出提升的结果,然后再根据显示顺序字段列出其他结果.

We want to first list elevated results in the top and then other results based on the display order field.

但是,我们找不到执行该操作的方法.任何帮助将不胜感激.

However, we are unable to find how to do this. Any help will be appreciated.

谢谢.

推荐答案

QueryElevation respects the sort parameter by default, but you can override this by giving the forceElevation parameter:

forceElevation

默认情况下,此组件遵循所请求的sort参数:如果请求要求按日期排序,则它将按日期对结果进行排序.如果forceElevation = true(默认设置),结果将首先返回增强后的文档,然后按日期排序.

By default, this component respects the requested sort parameter: if the request asks to sort by date, it will order the results by date. If forceElevation=true (the default), results will first return the boosted docs, then order by date.

这篇关于在按字段结果排序的顶部获取Solr提升的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆