Skip to content

Conversation

@JohnNiang
Copy link
Member

@JohnNiang JohnNiang commented Nov 9, 2022

What type of PR is this?

/kind feature
/area core
/milestone 2.0

What this PR does / why we need it:

This PR mainly implement full-text search of posts and provide extension point for other search engine.

Meanwhile, I implement ExtensionGetter to get implemention(s) of extension point from system ConfigMap.

But there still are something to do here:

  • Udpate documents when posts are published or posts are becoming unpublic.
  • Delete documents when posts are unpublished or deleted.

Because I'm waiting for #2659 got merged.

I create two endpoints:

  1. For full-text search of post

    curl -X 'GET' \
      'http://localhost:8090/apis/api.halo.run/v1alpha1/indices/post?keyword=halo&limit=10000&highlightPreTag=%3CB%3E&highlightPostTag=%3C%2FB%3E' \
      -H 'accept: */*'
  2. For refreshing indices

    curl -X 'POST' \
      'http://localhost:8090/apis/api.console.halo.run/v1alpha1/indices/post' \
      -H 'accept: */*' \
      -d ''

Which issue(s) this PR fixes:

Fixes ##2637

Special notes for your reviewer:

Does this PR introduce a user-facing change?

提供文章全文搜索功能并支持搜索引擎扩展

Signed-off-by: johnniang <johnniang@fastmail.com>
Signed-off-by: johnniang <johnniang@fastmail.com>
Signed-off-by: johnniang <johnniang@fastmail.com>
@f2c-ci-robot f2c-ci-robot bot added 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 Nov 9, 2022
@f2c-ci-robot f2c-ci-robot bot added this to the 2.0 milestone Nov 9, 2022
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and lan-yonghui November 9, 2022 06:46
@f2c-ci-robot f2c-ci-robot bot added area/core Issues or PRs related to the Halo Core needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 9, 2022
@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 Nov 10, 2022
Signed-off-by: John Niang <johnniang@fastmail.com>
@JohnNiang JohnNiang changed the title Implement full-text search of posts with Lucene default WIP: Implement full-text search of posts with Lucene default Nov 11, 2022
@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 11, 2022
Signed-off-by: John Niang <johnniang@fastmail.com>
Signed-off-by: John Niang <johnniang@fastmail.com>
Signed-off-by: John Niang <johnniang@fastmail.com>
Signed-off-by: John Niang <johnniang@fastmail.com>
Signed-off-by: John Niang <johnniang@fastmail.com>
Signed-off-by: John Niang <johnniang@fastmail.com>
@ruibaby
Copy link
Member

ruibaby commented Nov 11, 2022

plugin-search-widget-1.0.0-alpha.2-plain.jar.zip

主题端搜索可以使用这个插件来测试。

@JohnNiang JohnNiang changed the title WIP: Implement full-text search of posts with Lucene default Implement full-text search of posts with Lucene default Nov 11, 2022
@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 Nov 11, 2022
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 Nov 11, 2022
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this pull request Nov 11, 2022
#### What type of PR is this?

/kind improvement
/milestone 2.0

#### What this PR does / why we need it:

重构文章发布/取消发布/放入回收站的逻辑。适配 halo-dev/halo#2675

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 halo-dev/halo#2675 的分支。
2. Console 需要 `pnpm install`。
3. 测试文章发布/取消发布/放入回收站。

#### Does this PR introduce a user-facing change?

```release-note
None
```
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.

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Nov 11, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2022
@f2c-ci-robot f2c-ci-robot bot merged commit dac4eec into halo-dev:main Nov 11, 2022
@JohnNiang JohnNiang deleted the feat/full-text-search branch November 11, 2022 16:13
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request Mar 2, 2023
#### What type of PR is this?

/kind improvement
/milestone 2.0

#### What this PR does / why we need it:

重构文章发布/取消发布/放入回收站的逻辑。适配 halo-dev#2675

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 halo-dev#2675 的分支。
2. Console 需要 `pnpm install`。
3. 测试文章发布/取消发布/放入回收站。

#### Does this PR introduce a user-facing change?

```release-note
None
```
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/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.

3 participants