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

SearchMvtResponse is not Json serializable #38

Closed
iverase opened this issue Oct 18, 2021 · 2 comments · Fixed by #434
Closed

SearchMvtResponse is not Json serializable #38

iverase opened this issue Oct 18, 2021 · 2 comments · Fixed by #434
Assignees
Labels

Comments

@iverase
Copy link

iverase commented Oct 18, 2021

Trying a SearchMvtRequest gives an error as we are trying to serialise the response to Json:

RestClient restClient = RestClient.builder(new HttpHost("localhost", 9200)).build());
Transport transport = new RestClientTransport(restClient, new JacksonJsonpMapper());
ElasticsearchClient client = new ElasticsearchClient(transport);
SearchMvtResponse response = client.searchMvt(
        (builder) -> builder.zoom(0).x(0).y(0).addIndex("points").field("location")
 );

Gives the following error:

Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 26)): only regular white space (\r, \n, \t) is allowed between tokens
@swallez
Copy link
Member

swallez commented Dec 2, 2021

Thanks for the report @iverase. The search_mvt API is one of the few APIs that doesn't return JSON and the client was improperly trying to parse the binary vector tile response as JSON.

We haven't implemented binary responses yet and have removed this endpoint in the upcoming 7.16 release to avoid any confusion. It will be implemented in the next minor release.

@swallez swallez added v7.17.0 Category: Enhancement New feature or request and removed v7.16.1 labels Dec 2, 2021
@iverase
Copy link
Author

iverase commented Dec 2, 2021

Thanks @swalle for the info, it makes sense to remove it until it is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants