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

Error when using MatchingStrategy enum #562

Closed
alallema opened this issue Feb 27, 2023 · 0 comments · Fixed by #561
Closed

Error when using MatchingStrategy enum #562

alallema opened this issue Feb 27, 2023 · 0 comments · Fixed by #561
Labels
bug Something isn't working

Comments

@alallema
Copy link
Contributor

alallema commented Feb 27, 2023

Description
An error occurs when trying to use the MatchingStrategy strategy enum:

      SearchRequest searchRequest = SearchRequest.builder().q("").matchingStrategy(MatchingStrategy.ALL).build();
      SearchResult search = client.index("movies").search(searchRequest);

It seems that the enum is not well encoded and that the terms all or last are sent in capital letters:

Exception in thread "main" Meilisearch ApiException: {Error=APIError: {message='Unknown value `ALL` at `.matchingStrategy`: expected one of `last`, `all`', code='invalid_search_matching_strategy', type='invalid_request', link='https://docs.meilisearch.com/errors#invalid_search_matching_strategy'}}
@alallema alallema linked a pull request Feb 27, 2023 that will close this issue
@alallema alallema added the bug Something isn't working label Feb 27, 2023
@bors bors bot closed this as completed in #561 Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant