-
Notifications
You must be signed in to change notification settings - Fork 91
Improve Settings
#1864
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
base: main
Are you sure you want to change the base?
Improve Settings
#1864
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1864 +/- ##
==========================================
- Coverage 99.02% 97.95% -1.07%
==========================================
Files 18 19 +1
Lines 1435 1175 -260
Branches 303 252 -51
==========================================
- Hits 1421 1151 -270
- Misses 14 24 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 30 out of 30 changed files in this pull request and generated no comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors and improves the handling of Settings by separating and documenting settings types, centralizing settings update methods under a new "setting" property on the Index class, and significantly refactoring the tests related to settings. Key changes include:
- Moving and redefining Settings types into a dedicated settings module.
- Updating API calls to use the new client.index(...).setting.* method pattern.
- Removing or refactoring a number of tests to align with the new settings updates and experimental features support.
Reviewed Changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated no comments.
File | Description |
---|---|
tests/*.test.ts | Updates to test files to use new settings methods and removal of redundant tests |
src/types/*.ts | Refactoring of settings types and removal of duplicated definitions |
src/settings.ts, src/meilisearch.ts | Introduction of new settings functions and experimental features endpoints |
README.md, .code-samples.meilisearch.yaml | Documentation updates to reflect new settings API usage |
Comments suppressed due to low confidence (3)
tests/faceting.test.ts:1
- Several test files (e.g. faceting, filterable_attributes, facet_search_settings, distinct_attribute, displayed_attributes, dictionary) have been removed. Please ensure that the new or remaining tests fully cover all the settings functionalities previously verified to avoid gaps in test coverage.
Entire file removed
src/meilisearch.ts:459
- The new getExperimentalFeatures and updateExperimentalFeatures endpoints have been added using the 'patch' method for updates. Verify that these endpoints are fully documented, have clear versioning implications, and that there are adequate tests for their behavior.
New experimental features endpoints added
README.md:262
- Make sure that all usage examples and code samples in the documentation and YAML files accurately reflect the new settings API changes and provide guidance for users during migration.
Documentation examples updated to use client.index('myIndex').setting.*
Pull Request
What does this PR do?
Settings
typessetting
of theIndex
classMigration
client.index(uid).updateSettings
now requires the typeUpdatableSettings
instead of justSettings