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: only select the required index fields when build query index view #5312

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Feb 2, 2024

What type of PR is this?

/kind improvement
/area core
/milestone 2.13.x

What this PR does / why we need it:

构建查询视图时只选择被使用到的索引字段
how to test it?
验证文章和附件列表的查询条件和排序条件不会报错即可

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. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/improvement Categorizes issue or PR as related to a improvement. labels Feb 2, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.13.x milestone Feb 2, 2024
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Feb 2, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from LIlGG and ruibaby February 2, 2024 09:53
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 56.92%. Comparing base (5fdf6c0) to head (97d5f89).
Report is 29 commits behind head on main.

Files Patch % Lines
...n/halo/app/extension/index/query/QueryFactory.java 90.00% 0 Missing and 1 partial ⚠️
...lo/app/extension/index/IndexedQueryEngineImpl.java 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5312      +/-   ##
============================================
+ Coverage     56.91%   56.92%   +0.01%     
- Complexity     3319     3342      +23     
============================================
  Files           587      588       +1     
  Lines         18968    19077     +109     
  Branches       1401     1409       +8     
============================================
+ Hits          10795    10859      +64     
- Misses         7594     7635      +41     
- Partials        579      583       +4     

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

@f2c-ci-robot f2c-ci-robot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 5, 2024
…x view

# Conflicts:
#	api/src/test/java/run/halo/app/extension/index/query/QueryFactoryTest.java
#	application/src/main/java/run/halo/app/extension/index/IndexedQueryEngineImpl.java
@guqing guqing force-pushed the refactor/build-index-view branch from a05044d to 97d5f89 Compare February 26, 2024 04:56
@f2c-ci-robot f2c-ci-robot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 26, 2024
Copy link

sonarcloud bot commented Feb 26, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.3% Duplication on New Code

See analysis details on SonarCloud

@guqing guqing marked this pull request as ready for review February 26, 2024 07:12
@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 26, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from JohnNiang February 26, 2024 07:12
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

@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 27, 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 27, 2024
Copy link

f2c-ci-robot bot commented Feb 27, 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

@f2c-ci-robot f2c-ci-robot bot merged commit 7f4abbb into halo-dev:main Feb 27, 2024
8 checks passed
@guqing guqing deleted the refactor/build-index-view branch February 27, 2024 09:21
@ruibaby ruibaby modified the milestones: 2.13.x, 2.13.0 Feb 27, 2024
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. area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. 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.

3 participants