Open
Conversation
setting应该以package的修改时间排序,不然行内package搜索列表就是固定排序的
fengmk2
reviewed
Mar 15, 2024
| { | ||
| "index": { | ||
| "sort.field": "package.modified", | ||
| "sort.order": "desc", |
Contributor
There was a problem hiding this comment.
索引重建是一个成本比较高的事情,尤其是修改 sort,感觉可以加个备注,有需要开启。毕竟这个排序在前端搜出来也可以自己排下。
Author
There was a problem hiding this comment.
索引重建是一个成本比较高的事情,尤其是修改 sort,感觉可以加个备注,有需要开启。毕竟这个排序在前端搜出来也可以自己排下。
如果分页请求,假设每页显示20条,那前端能做的排序只是针对这20条的,不是整体排序,顺序还是有问题
Contributor
There was a problem hiding this comment.
应该可以通过 sort 来重新排序,以避免影响整个 index,见: https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setting应该以package的修改时间排序,不然私有package搜索列表就是固定排序的