Repository navigation
feat: add index mechanism for extension - #5121
Merged
Merged
Conversation
guqing
force-pushed
the
feature/index
branch
14 times, most recently
from
January 2, 2024 10:21
7367f2d to
14deb2a
Compare
guqing
marked this pull request as ready for review
January 2, 2024 10:22
guqing
force-pushed
the
feature/index
branch
3 times, most recently
from
January 3, 2024 08:44
50a95d2 to
090e50d
Compare
JohnNiang
reviewed
Jan 16, 2024
JohnNiang
reviewed
Jan 16, 2024
JohnNiang
reviewed
Jan 17, 2024
JohnNiang
reviewed
Jan 17, 2024
JohnNiang
reviewed
Jan 17, 2024
JohnNiang
reviewed
Jan 17, 2024
JohnNiang
left a comment
Member
There was a problem hiding this comment.
目前似乎没有发现可以自定义 Indexer 的地方。
IMO,我们可以在构建索引之前任意添加 Indexer,无论是在 Halo Core 中还是在插件中。
Member
Author
目前自己添加 Indexer 的需求是什么呢?每个自定义模型添加 IndexSpec 后启动时就会构建索引并创建 Indexer,可以参考这个适配的 PR halo-sigs/plugin-moments#69 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang, ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Closed
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.
What type of PR is this?
/kind feature
/area core
/milestone 2.12.x
What this PR does / why we need it:
新增自定义模型索引机制
默认为所有的自定义模型都添加了以下索引:
how to test it?
可以正确在自动生成的 list APIs 使用 fieldSelector 来过滤
spec.slug和排序,可以自己添加其他的 indexSpec 测试6. 测试唯一索引并添加重复数据,期望无法添加进去
Which issue(s) this PR fixes:
Fixes #5058
Does this PR introduce a user-facing change?