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

refactor: using indexes to query post lists #5230

Merged
merged 11 commits into from Jan 25, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Jan 22, 2024

What type of PR is this?

/kind feature
/area core
/area console
/milestone 2.12.x

What this PR does / why we need it:

使用索引功能来查询文章列表

how to test it?

  1. 测试文章列表的筛选条件是否正确
  2. 测试文章列表中关联的标签和分类信息是否正确
  3. 测试仪表盘的文章数量统计是否正确
  4. 测试分类关联文章的数量是否正确
  5. 测试标签关联文章的文章是否正确
  6. 测试主题端文章列表是否正确

Which issue(s) this PR fixes:

Fixes #5223

Does this PR introduce a user-facing change?

使用索引功能检索文章以显著降低资源消耗并提供更快、更高效的文章检索体验

@f2c-ci-robot f2c-ci-robot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jan 22, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.12.x milestone Jan 22, 2024
@f2c-ci-robot f2c-ci-robot bot added area/core Issues or PRs related to the Halo Core area/console Issues or PRs related to the Halo Console labels Jan 22, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from LIlGG and wan92hen January 22, 2024 09:45
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 174 lines in your changes are missing coverage. Please review.

Comparison is base (7e8df33) 57.18% compared to head (a24792d) 57.08%.
Report is 5 commits behind head on main.

❗ Current head a24792d differs from pull request most recent head c3c6567. Consider uploading reports for the commit c3c6567 to get more accurate results

Files Patch % Lines
...un/halo/app/theme/finders/impl/PostFinderImpl.java 43.07% 34 Missing and 3 partials ⚠️
.../src/main/java/run/halo/app/content/PostQuery.java 34.61% 16 Missing and 1 partial ⚠️
...ava/run/halo/app/content/impl/PostServiceImpl.java 0.00% 15 Missing ⚠️
...run/halo/app/theme/finders/impl/TagFinderImpl.java 13.33% 13 Missing ⚠️
...lo/app/theme/finders/impl/SiteStatsFinderImpl.java 0.00% 12 Missing ⚠️
.../run/halo/app/theme/endpoint/TagQueryEndpoint.java 0.00% 10 Missing ⚠️
...alo/app/theme/finders/impl/CategoryFinderImpl.java 43.75% 9 Missing ⚠️
...eme/router/factories/CategoryPostRouteFactory.java 0.00% 9 Missing ⚠️
...alo/app/core/extension/endpoint/StatsEndpoint.java 0.00% 8 Missing ⚠️
...ain/java/run/halo/app/infra/SchemeInitializer.java 90.47% 1 Missing and 7 partials ⚠️
... and 12 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5230      +/-   ##
============================================
- Coverage     57.18%   57.08%   -0.11%     
+ Complexity     3384     3364      -20     
============================================
  Files           587      585       -2     
  Lines         19235    19178      -57     
  Branches       1460     1427      -33     
============================================
- Hits          10999    10947      -52     
+ Misses         7652     7645       -7     
- Partials        584      586       +2     

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

@guqing
Copy link
Member Author

guqing commented Jan 23, 2024

ruibaby and others added 3 commits January 24, 2024 10:53
Signed-off-by: Ryan Wang <i@ryanc.cc>
Signed-off-by: Ryan Wang <i@ryanc.cc>
@guqing guqing marked this pull request as ready for review January 24, 2024 04:29
@guqing
Copy link
Member Author

guqing commented Jan 24, 2024

ok to test and ready for review

@LIlGG
Copy link
Member

LIlGG commented Jan 24, 2024

/lgtm

Signed-off-by: Ryan Wang <i@ryanc.cc>
@f2c-ci-robot f2c-ci-robot bot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Jan 24, 2024
@guqing guqing removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 24, 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 Jan 25, 2024
Copy link
Member

@LIlGG LIlGG left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

f2c-ci-robot bot commented Jan 25, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LIlGG
Once this PR has been reviewed and has the lgtm label, please ask for approval from guqing. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@ruibaby ruibaby merged commit 3f27f6f into halo-dev:main Jan 25, 2024
6 of 7 checks passed
@ruibaby ruibaby modified the milestones: 2.12.x, 2.12.0 Jan 25, 2024
@guqing guqing deleted the feature/post-index branch January 25, 2024 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console Issues or PRs related to the Halo Console area/core Issues or PRs related to the Halo Core kind/feature Categorizes issue or PR as related to a new feature. 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.

目前 Halo 已经提供索引功能建议文章适配
3 participants