You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not able to disable stored_fields in the search request using Java API Client (but was able with RestHighLevelClient).
Creating a request: new SearchRequest.Builder().storedFields("_none_")...;
and sending it: asyncClient.search(request, String.class)
That causes an error while response parsing:
co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.core.search.HitsMetadata: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Hit.id' (JSON path: hits.hits[0]) (line no=1, column no=362, offset=-1)(Error deserializing co.elastic.clients.elasticsearch.core.search.HitsMetadata: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Hit.id' (JSON path: hits.hits[0]) (line no=1, column no=362, offset=-1))
at co.elastic.clients.json.JsonpMappingException.from0(JsonpMappingException.java:134)
at co.elastic.clients.json.JsonpMappingException.from(JsonpMappingException.java:125)
at co.elastic.clients.json.JsonpDeserializerBase$ArrayDeserializer.deserialize(JsonpDeserializerBase.java:320)
at co.elastic.clients.json.JsonpDeserializerBase$ArrayDeserializer.deserialize(JsonpDeserializerBase.java:280)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:75)
at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:71)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:180)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:136)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:75)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:79)
at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:71)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:180)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:136)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:75)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:79)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.transport.endpoints.EndpointWithResponseMapperAttr$1.deserialize(EndpointWithResponseMapperAttr.java:56)
at co.elastic.clients.transport.rest_client.RestClientTransport.decodeResponse(RestClientTransport.java:328)
at co.elastic.clients.transport.rest_client.RestClientTransport.getHighLevelResponse(RestClientTransport.java:294)
at co.elastic.clients.transport.rest_client.RestClientTransport.access$200(RestClientTransport.java:63)
at co.elastic.clients.transport.rest_client.RestClientTransport$1.onSuccess(RestClientTransport.java:168)
at org.elasticsearch.client.RestClient$FailureTrackingResponseListener.onSuccess(RestClient.java:678)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:399)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:393)
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:122)
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:182)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:448)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:338)
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:87)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:40)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
at java.lang.Thread.run(Thread.java:833)
Caused by:co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Hit.id'(Missing required property 'Hit.id')
at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76)
at co.elastic.clients.elasticsearch.core.search.Hit.(Hit.java:117)
at co.elastic.clients.elasticsearch.core.search.Hit.(Hit.java:59)
at co.elastic.clients.elasticsearch.core.search.Hit$Builder.build(Hit.java:775)
at co.elastic.clients.elasticsearch.core.search.Hit$Builder.build(Hit.java:443)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:86)
at co.elastic.clients.json.JsonpDeserializerBase$ArrayDeserializer.deserialize(JsonpDeserializerBase.java:316)
:
The text was updated successfully, but these errors were encountered:
Right. It's a temporal workaround.
From the same documentation:
"If the issue is still present on the latest version, open an issue so that we can fix it in the next release. Please help us to improve the Java API Client."
Java API client version
7.17.7
Java version
17
Elasticsearch Version
7.17.5
Problem description
I'm not able to disable stored_fields in the search request using Java API Client (but was able with RestHighLevelClient).
Creating a request:
new SearchRequest.Builder().storedFields("_none_")...;
and sending it:
asyncClient.search(request, String.class)
That causes an error while response parsing:
co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.core.search.HitsMetadata: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Hit.id' (JSON path: hits.hits[0]) (line no=1, column no=362, offset=-1)(Error deserializing co.elastic.clients.elasticsearch.core.search.HitsMetadata: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Hit.id' (JSON path: hits.hits[0]) (line no=1, column no=362, offset=-1))
at co.elastic.clients.json.JsonpMappingException.from0(JsonpMappingException.java:134)
at co.elastic.clients.json.JsonpMappingException.from(JsonpMappingException.java:125)
at co.elastic.clients.json.JsonpDeserializerBase$ArrayDeserializer.deserialize(JsonpDeserializerBase.java:320)
at co.elastic.clients.json.JsonpDeserializerBase$ArrayDeserializer.deserialize(JsonpDeserializerBase.java:280)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:75)
at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:71)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:180)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:136)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:75)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:79)
at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:71)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:180)
at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:136)
at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:75)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:79)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
at co.elastic.clients.transport.endpoints.EndpointWithResponseMapperAttr$1.deserialize(EndpointWithResponseMapperAttr.java:56)
at co.elastic.clients.transport.rest_client.RestClientTransport.decodeResponse(RestClientTransport.java:328)
at co.elastic.clients.transport.rest_client.RestClientTransport.getHighLevelResponse(RestClientTransport.java:294)
at co.elastic.clients.transport.rest_client.RestClientTransport.access$200(RestClientTransport.java:63)
at co.elastic.clients.transport.rest_client.RestClientTransport$1.onSuccess(RestClientTransport.java:168)
at org.elasticsearch.client.RestClient$FailureTrackingResponseListener.onSuccess(RestClient.java:678)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:399)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:393)
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:122)
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:182)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:448)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:338)
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:87)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:40)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
at java.lang.Thread.run(Thread.java:833)
Caused by:co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Hit.id'(Missing required property 'Hit.id')
at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76)
at co.elastic.clients.elasticsearch.core.search.Hit.(Hit.java:117)
at co.elastic.clients.elasticsearch.core.search.Hit.(Hit.java:59)
at co.elastic.clients.elasticsearch.core.search.Hit$Builder.build(Hit.java:775)
at co.elastic.clients.elasticsearch.core.search.Hit$Builder.build(Hit.java:443)
at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:86)
at co.elastic.clients.json.JsonpDeserializerBase$ArrayDeserializer.deserialize(JsonpDeserializerBase.java:316)
:
The text was updated successfully, but these errors were encountered: