Getting Solr Elevated Results on top of Sorted by field Results

拈花ヽ惹草 提交于 2019-12-24 06:58:30

问题


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:


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.



来源:https://stackoverflow.com/questions/38156686/getting-solr-elevated-results-on-top-of-sorted-by-field-results

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!