There is an option in the api to not retrieve field statistics when executing a mtermvector request but doing so results in an error when deserializing the response. This is related to #838 and #716.
POST /_mtermvectors
{"docs":[{"_id":"1","_index":"my-index","fields":["transcript:en:content"],"field_statistics":false,"offsets":true,"positions":true}]}
Caused by: co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.core.mtermvectors.MultiTermVectorsResult: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'TermVector.fieldStatistics' (JSON path: docs[0].term_vectors['transcript:en:content']) (line no=1, column no=8503, offset=-1)
at co.elastic.clients.json.JsonpMappingException.from0(JsonpMappingException.java:134) ~[elasticsearch-java-8.14.1.jar:?]
at co.elastic.clients.json.JsonpMappingException.from(JsonpMappingException.java:121) ~[elasticsearch-java-8.14.1.jar:?]
at co.elastic.clients.json.JsonpDeserializerBase$StringMapDeserializer.deserialize(JsonpDeserializerBase.java:353) ~[elasticsearch-java-8.14.1.jar:?]
at co.elastic.clients.json.JsonpDeserializerBase$StringMapDeserializer.deserialize(JsonpDeserializerBase.java:333) ~[elasticsearch-java-8.14.1.jar:?]
Hello, thanks for reporting this! Both this and #838 are errors in the API specification which we use to generate the client, we'll fix it there and regenerate the code to solve the issue.
Java API client version
8.14.1
Java version
21
Elasticsearch Version
8.14.1
Problem description
There is an option in the api to not retrieve field statistics when executing a mtermvector request but doing so results in an error when deserializing the response. This is related to #838 and #716.