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

enhance: meilisearchを有効にしてもミュートやブロックを考慮するように #12575

Merged
merged 3 commits into from
Dec 7, 2023

Conversation

kanarikanaru
Copy link
Contributor

What

searchServiceのMeilisearchの検索部分に、Redisにあるキャッシュされたミュートやブロックの情報を用いたノートのフィルター機能をつけました。

これによって、被ブロックのアカウントが検索した場合に、ブロックしたアカウントのノートは検索結果に表示されなくなります。加えて、アカウントをミュートした場合も検索結果に表示されなくなります。

Why

PostgreSQLのデータベースへの負荷を減らす目的でMeilisearchを導入すると思いますが、データベースを用いた検索からブロックとミュートが抜け落ちています。

Redisにキャッシュされたブロックやミュートの情報を利用することで、データベースに負荷をかけずにノートのフィルター処理を行うことができるようになったため、本PRを作成しました。

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Dec 4, 2023
Copy link
Contributor

github-actions bot commented Dec 4, 2023

このPRによるapi.jsonの差分

差分はこちら

Get diff files from Workflow Page

@Sayamame-beans
Copy link
Member

This may fix: #10844

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

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

Comparison is base (e42c91d) 78.93% compared to head (0d4dd89) 78.81%.

Files Patch % Lines
packages/backend/src/core/SearchService.ts 20.00% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12575      +/-   ##
===========================================
- Coverage    78.93%   78.81%   -0.12%     
===========================================
  Files          957      957              
  Lines       104165   104179      +14     
  Branches      8361     8334      -27     
===========================================
- Hits         82218    82112     -106     
- Misses       21947    22067     +120     

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

@syuilo syuilo merged commit bcf6b7f into misskey-dev:develop Dec 7, 2023
18 checks passed
@syuilo
Copy link
Member

syuilo commented Dec 7, 2023

👍

@kanarikanaru kanarikanaru deleted the meilisearch-visibility branch December 7, 2023 12:43
camilla-ett pushed a commit to kaseiski/misskey that referenced this pull request Jan 2, 2024
* enhance: meilisearchを有効にしてもミュートやブロックを考慮するように

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants