Getting Solr Elevated Results on top of Sorted by

2019-07-23 17:35发布

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.

Thanks in advance.

1条回答
干净又极端
2楼-- · 2019-07-23 18:08

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

forceElevation

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.

查看更多
登录 后发表回答