elastic/elasticsearch

Add support for collapse sort to specify how to sort groups relative to each other

Open

#45,646 创建于 2019年8月16日

在 GitHub 查看
 (26 评论) (31 反应) (0 负责人)Java (25,882 fork)batch import
:Search Relevance/Ranking>enhancementTeam:Search Relevancehelp wantedhigh hanging fruit

仓库指标

Star
 (76,700 star)
PR 合并指标
 (平均合并 2天) (30 天内合并 1,000 个 PR)

描述

This is a feature request.

At the moment, field collapsing will use the same scoring as the main query to choose the document that will appear in the main search results hits.

it would be good to have a score for the main query but another score to choose which one is going to be chosen within the field-collapsed set.

We can use inner_hit to sort the inner hits but this does not change the top document that has been chosen in the main hits. We can then manually choose the inner_hit..hits.hits[0] instead of the top hits.

I think the collapse feature would benefit from having a collapse_sort that will define the hit that will be chosen at the top level.

Thanks

贡献者指南