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

Unable to use multisearch if jackson json handler is used #766

Open
jdvalenzuelah opened this issue Aug 21, 2024 · 0 comments
Open

Unable to use multisearch if jackson json handler is used #766

jdvalenzuelah opened this issue Aug 21, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jdvalenzuelah
Copy link
Contributor

Description
When using JacksonJsonHandler with a default ObjectMapper, multisearch throws InvalidDefinitionException when serializing request.
As a work around updating property visibility fixes it.

objectMapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY)

Expected behavior
It should not be needed to change property visibility to make multisearch request

Current behavior
Exception is thrown

Screenshots or Logs

java.lang.RuntimeException: Meilisearch Exception: {com.fasterxml.jackson.databind.exc.InvalidDefinitionException. Error=com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class com.meilisearch.sdk.MultiSearchRequest and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)}
	at com.meilisearch.sdk.http.request.BasicRequest.create(BasicRequest.java:22)
	at com.meilisearch.sdk.HttpClient.post(HttpClient.java:95)
	at com.meilisearch.sdk.Client.multiSearch(Client.java:433)

Environment (please complete the following information):

  • OS: macos
  • Meilisearch version: 1.9.0
  • meilisearch-java version: v.0.14.0
@curquiza curquiza added bug Something isn't working good first issue Good for newcomers labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants