Skip to content

mtermvectors fails when deserializing response if field_statistics is set to false #839

Closed
@spacelore

Description

@spacelore

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.

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:?]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: SpecificationRelated to the API spec used to generate client codeCategory: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions