The High Level Rest Client should support the API compatibility content-type.
It should be opt-in, and enabled in two ways:
- as a configuration on the client itself, e.g.
client.setApiCompatibilityMode(true)
- from an
ELASTICSEARCH_APIVERSIONING environment variables as generally supported by Elasticsearch client libraries, which allows enabling compatibility mode without rebuilding applications.
Looking at RequestContervers.REQUEST_BODY_CONTENT_TYPE it seems that HLRC only supports JSON encoding and not CBOR/SMILE/YAML, so we should only support the corresponding vendor media type application/vnd.elasticsearch+smile;compatible-with=7.
The High Level Rest Client should support the API compatibility content-type.
It should be opt-in, and enabled in two ways:
client.setApiCompatibilityMode(true)ELASTICSEARCH_APIVERSIONINGenvironment variables as generally supported by Elasticsearch client libraries, which allows enabling compatibility mode without rebuilding applications.Looking at
RequestContervers.REQUEST_BODY_CONTENT_TYPEit seems that HLRC only supports JSON encoding and not CBOR/SMILE/YAML, so we should only support the corresponding vendor media typeapplication/vnd.elasticsearch+smile;compatible-with=7.