Skip to content

Fix and tune synonyms API #2235

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

Merged
merged 3 commits into from
Aug 11, 2023
Merged

Fix and tune synonyms API #2235

merged 3 commits into from
Aug 11, 2023

Conversation

swallez
Copy link
Member

@swallez swallez commented Aug 11, 2023

Follow-up to #2234

This PR fixes some modelling issues and refines the specification:

  • Rename SynonymRuleOptionalId and SynonymRule to SynonymRule and SynonymRuleRead, respectively, and use the OverloadOf feature.
  • Removed inheritance between SynonymRule variations, since a subclass should not override a property defined in its parent class (need to add a validation rule for this)
  • Use Id instead of Name
  • Use @server_default to capture default values
  • Fix response definitions where _shards: ShardStatistics was not a the correct nesting level

@swallez swallez requested a review from carlosdelest August 11, 2023 13:21
@swallez swallez self-assigned this Aug 11, 2023
Copy link
Member

@carlosdelest carlosdelest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the improvements! 💯

@github-actions
Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
indices.reload_search_analyzers 🟢 2/2 2/2
synonyms.delete_synonym_rule Missing test Missing test
synonyms.delete_synonym Missing test Missing test
synonyms.get_synonym_rule Missing test Missing test
synonyms.get_synonym Missing test Missing test
synonyms.get_synonyms_sets Missing test Missing test
synonyms.put_synonym_rule Missing test Missing test
synonyms.put_synonym Missing test Missing test

You can validate these APIs yourself by using the make validate target.

@swallez swallez merged commit 94a3330 into main Aug 11, 2023
@swallez swallez deleted the fix-synonyms branch August 11, 2023 16:22
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.

2 participants