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 have observed a type inconsistency in the Java client related to the priority field when working with index templates. I am using the 2.9.0 client version, and I see the issue is still present in the latest version.
Details:
PutIndexTemplateRequest (org.opensearch.client.opensearch.indices.PutIndexTemplateRequest): the priority field is of type Integer
IndexTemplate (org.opensearch.client.opensearch.indices.get_index_template.IndexTemplate): The priority field is of type Long
Issue:
OpenSearch itself supports a 64-bit integer (int64) for the index template priority, but the Java client's PutIndexTemplateRequest only allows an Integer. This mismatch does not allow creating index templates with values above Integer.MAX_VALUE using the Java client.
Expected Behavior:
Both PutIndexTemplateRequest and IndexTemplate should use Long for the priority field to align with OpenSearch's API.