-
Notifications
You must be signed in to change notification settings - Fork 243
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
No way to set stored_fields
to the string _none_
using the Java API client
#680
Comments
@davechallis did you find a workaround for this issue? I'm facing the same issue and it's a huge performance bottleneck. |
@valasatava afraid not, I had a look through the source, and I don't think it's at all possible with the Java API client. In the end we had to switch to using the low level REST client, and writing our own classes to construct queries. |
Hello! Thank you for reporting this, and sorry for the wait. The problem here is that the java clients defaults to sending |
Definitely a bug on our side, will be fixed soon! |
Let me also upvote this issue, it blocks us from moving to the Java API client |
fixed in the code generator, will be part of the next release! |
Java API client version
8.9.1
Java version
17
Elasticsearch Version
8.10.2
Problem description
Elasticsearch allows stored fields to be disabled entirely by setting
"stored_fields": "_none_"
in search requests (https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#disable-stored-fields).There's no way to set this using the Java API client however, as the builders (and the JSON the Java API client generates) always generate a list of strings for the
stored_fields
parameter.If a request is created from JSON directly, using e.g.:
when that search is sent, the Java API client generates JSON containing:
This then causes a null pointer exception when the request is actually sent:
The text was updated successfully, but these errors were encountered: