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

Add a convenient way to toggle experimental features #589

Open
ellnix opened this issue Jan 9, 2025 · 3 comments · May be fixed by #594
Open

Add a convenient way to toggle experimental features #589

ellnix opened this issue Jan 9, 2025 · 3 comments · May be fixed by #594
Labels
enhancement New feature or request

Comments

@ellnix
Copy link
Collaborator

ellnix commented Jan 9, 2025

I was looking into implementing meilisearch/meilisearch-rails#316, but toggling an experimental feature currently requires a lot of smelly code.

Perhaps Client#set_experimental_feature!(feature, state)?

We already have tests on experimental features, and the test helper is currently the only place where we have a convenient way to toggle these features (and the implementation is not pretty): https://github.com/meilisearch/meilisearch-ruby/blob/main/spec/support/experimental_feature_helpers.rb

@curquiza
Copy link
Member

We can indeed add this method in the SDK if you think this is convenient for the users
However, be careful this route is itself "breakable" -> fields can be accepted in some versions and not in another one if they are stabilized or removed

@curquiza curquiza added the enhancement New feature or request label Jan 10, 2025
@ellnix
Copy link
Collaborator Author

ellnix commented Jan 10, 2025

I take most of what I said last night, I see that there's a standard way to do this in the reference: https://www.meilisearch.com/docs/reference/api/experimental_features

And we can get around the issue of missing options by simply polling Meilisearch for the available options, that way I won't have to hard code version numbers in meilisearch-rails in order to keep compatibility for multiple versions.

I'll go ahead and implement this in ruby since it seems to be already implemented in Go and Rust, unless there's a reason I shouldn't do it.

@curquiza
Copy link
Member

You can go!

@ellnix ellnix linked a pull request Jan 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants