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
The error is primarily related only to when the Shard level is specified. For other levels, the error does not occur.
I believe the error is centered around how the ShardStats class creates objects for the statistics for each of the primary shards. The error is called around the function call of requireNonNull in the ApiTypeHelper class.
There is method to bypass this, in which before calling the response, one call call ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck(true); to ensure that a given response is returned
IndicesStatsRequest indicesStatsRequest=newIndicesStatsRequest.Builder().index(indices).level(Level.Shards).build();
// (openSearchClient is a OpenSearchClient class)
openSearchClient.indices().stats(indicesStatsRequest);
For 'dangerous' success
ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck(true);
IndicesStatsRequest indicesStatsRequest=newIndicesStatsRequest.Builder().index(indices).level(Level.Shards).build();
// (openSearchClient is a OpenSearchClient class)
openSearchClient.indices().stats(indicesStatsRequest);
What is the expected behaviour
Either the ShardStats are returned or are not required.
Further details
The API Documentation on the README contains no information for the field, nor of the ShardStats class.
Furthermore, for the relevant documentation page, https://opensearch.org/docs/latest/api-reference/index-apis/stats, there is no information on the shards field
The text was updated successfully, but these errors were encountered:
Please and thank you. You'll need to dig up when it was added, etc. We plan to generate docs from the api spec, so up to you if you want to manually add that too now.
What is the Bug
When sending a IndicesStatsRequest via a OpenSearchIndicesClient request, the following error is raised
The error is primarily related only to when the Shard level is specified. For other levels, the error does not occur.
I believe the error is centered around how the ShardStats class creates objects for the statistics for each of the primary shards. The error is called around the function call of requireNonNull in the ApiTypeHelper class.
There is method to bypass this, in which before calling the response, one call call ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck(true); to ensure that a given response is returned
How to Run
OpenSearch version info
{
"name": -----,
"cluster_name": -----,
"cluster_uuid": "eRQAiiiiVRJ67bdt_J2IBXQ",
"version": {
"distribution": "opensearch",
"number": "2.15.0",
"build_type": "tar",
"build_hash": "61dbcd079goe5gn4o5be5762175414bc38bbcadf",
"build_date": "2024-06-20T03:26:49.193630411Z",
"build_snapshot": false,
"lucene_version": "9.10.0",
"minimum_wire_compatibility_version": "7.10.0",
"minimum_index_compatibility_version": "7.0.0"
},
"tagline": "The OpenSearch Project: https://opensearch.org/"
}
For failure
For 'dangerous' success
What is the expected behaviour
Either the ShardStats are returned or are not required.
Further details
The API Documentation on the README contains no information for the field, nor of the ShardStats class.
Furthermore, for the relevant documentation page, https://opensearch.org/docs/latest/api-reference/index-apis/stats, there is no information on the shards field
The text was updated successfully, but these errors were encountered: