Skip to content

Conversation

@lucaszhu2zgf
Copy link

@lucaszhu2zgf lucaszhu2zgf commented Mar 15, 2024

setting应该以package的修改时间排序,不然私有package搜索列表就是固定排序的

setting应该以package的修改时间排序,不然行内package搜索列表就是固定排序的
@fengmk2 fengmk2 requested a review from Beace March 15, 2024 08:27
{
"index": {
"sort.field": "package.modified",
"sort.order": "desc",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否需要增加一个索引变更操作说明?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

索引重建是一个成本比较高的事情,尤其是修改 sort,感觉可以加个备注,有需要开启。毕竟这个排序在前端搜出来也可以自己排下。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

晚点我补充

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

索引重建是一个成本比较高的事情,尤其是修改 sort,感觉可以加个备注,有需要开启。毕竟这个排序在前端搜出来也可以自己排下。

如果分页请求,假设每页显示20条,那前端能做的排序只是针对这20条的,不是整体排序,顺序还是有问题

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该可以通过 sort 来重新排序,以避免影响整个 index,见: https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html

@codecov
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.82%. Comparing base (64bb78c) to head (de7098e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #660   +/-   ##
=======================================
  Coverage   96.82%   96.82%           
=======================================
  Files         180      180           
  Lines       17626    17626           
  Branches     2293     2293           
=======================================
  Hits        17067    17067           
  Misses        559      559           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants