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

perf: 起動時にMeiliSearchの設定を更新しないようにする #158

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

u1-liquid
Copy link
Member

What

起動時にMeiliSearchの設定を更新しないようにする

Why

インデックス設定を更新すると再インデックスタスクが走るので、MeiliSearchが重たくなるため

WARNING
Updating searchable attributes will re-index all documents in the index, which can take some time. We recommend updating your index settings first and then adding documents as this reduces RAM consumption.

https://www.meilisearch.com/docs/reference/api/settings#searchable-attributes

Additional info (optional)

TODO: MeiliSearch再構築・アップデート時に以下のようなリクエストを投げる必要がある

curl \
  -X PATCH 'http://localhost:7700/indexes/movies/settings' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "searchableAttributes": [
      "text",
      "cw"
    ],
    "filterableAttributes": [
      "channelId",
      "createdAt",
      "tags",
      "userHost",
      "userId"
    ],
    "sortableAttributes": [
      "createdAt"
    ],
    "typoTolerance": {
      "enabled": false
    },
    "pagination": {
      "maxTotalHits": 10000
    }
  }'

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

インデックス設定を更新すると再インデックスタスクが走るので、MeiliSearchが重たくなるため
@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@u1-liquid u1-liquid merged commit e1218de into io Aug 22, 2023
17 checks passed
@u1-liquid u1-liquid deleted the perf-no-meili-setting-update branch August 22, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants