Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-2.12] chore: remove unnecessary indices build process for lucene on startup #5333

Conversation

halo-dev-bot
Copy link
Collaborator

This is an automated cherry-pick of #5332

/assign guqing

移除启动时不必要的搜索引擎索引构建步骤

@f2c-ci-robot f2c-ci-robot bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Feb 5, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and JohnNiang February 5, 2024 06:55
@JohnNiang JohnNiang added this to the 2.12.2 milestone Feb 5, 2024
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

/approve

Copy link

sonarqubecloud bot commented Feb 5, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2024
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 5, 2024
Copy link

f2c-ci-robot bot commented Feb 5, 2024

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot merged commit 46efa87 into halo-dev:release-2.12 Feb 5, 2024
8 checks passed
@Rainsheep
Copy link

启动时刷新索引是非必要的。
刷新索引的能力能否放开给插件? 启动不会建立索引,刷新索引功能未开放给插件。 目前仅能依靠用户手动刷新。

@JohnNiang
Copy link
Member

Hi @Rainsheep ,目前文章的状态变更(如:发布->未发布,未发布->发布)是会调用扩展点addDocuments 或者 removeDocuments 方法,可以做到只刷新部分数据,而不是重新构建索引(用户手动刷新)。

@Rainsheep
Copy link

@JohnNiang 用户在已有 Post 的前提下去安装 搜索类插件,必须手动刷新索引才能加载已发布的文章,增加了用户使用的复杂性,况且很多用户不知道刷新索引。
是否考虑将 IndicesService 加入到 shareApplicationContext 中,使容器拥有刷新索引的能力?
将刷新索引和 halo 解耦,提升 halo 的性能。 只有装了插件的人才会自动刷新索引,也算一种这折中方案?

@JohnNiang
Copy link
Member

Hi @Rainsheep ,有道理。

不过建议重新创建 Issue 来跟进这个功能。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants