meilisearch / meilisearch-java

Java client for Meilisearch

Home Page:https://meilisearch.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when using `MatchingStrategy` enum

alallema opened this issue · comments

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'}}