Comments (5)
Starting with version 7.16, the Java client sends these headers to be compatible with Elasticsearch 8.0 that will have a "7.0 compatible mode" to ease the transition to this new major version.
The server-side part of this migration logic was added to Elasticsearch 7.14, and therefore the Java client requires Elasticsearch 7.14 or more. See also our compatibility guarantees.
from elasticsearch-java.
Starting with version 7.16, the Java client sends these headers to be compatible with Elasticsearch 8.0 that will have a "7.0 compatible mode" to ease the transition to this new major version.
The server-side part of this migration logic was added to Elasticsearch 7.14, and therefore the Java client requires Elasticsearch 7.14 or more. See also our compatibility guarantees.
Hi there, I'd like to know if the latest version of java API client supports RestHighLevelClientBuilder#setApiCompatibilityMode
. ref: elastic/elasticsearch#51816 (comment)
from elasticsearch-java.
Hi @swallez, I found a really wired case:
RestClient restClient = RestClient.builder(
new HttpHost("localhost", 9200)).build();
RestHighLevelClient hlrc = new RestHighLevelClientBuilder(restClient)
.setApiCompatibilityMode(false) // disable the compatibility headers
.build();
RestClientOptions restClientOptions = new RestClientOptions(RequestOptions.DEFAULT);
ElasticsearchTransport transport = new RestClientTransport(
hlrc.getLowLevelClient(), new JacksonJsonpMapper(), restClientOptions); // override the default headers
ElasticsearchClient client = new ElasticsearchClient(transport)
.withTransportOptions(restClientOptions); // override the default headers again, it seems this don't override above config
Even configured as above, won't disable thoese headers. And it seems something happened here.
from elasticsearch-java.
The compatibility mode on the High Level Rest Client only applies to that class, and not to the lower level Rest Client (that one only deals with raw requests and responses). This "opt in" behavior was introduced because it was changing the default behavior of High Level Rest Client.
For Java API client we made a different choice: since the compatibility mode is supported in Elasticsearch since version 7.14 and the Java API client was released as GA in 7.16, we decided to always send the version compatibility information to ease the future transition to Elasticsearch version 8.0 without requiring any change to application code.
from elasticsearch-java.
The compatibility mode on the High Level Rest Client only applies to that class, and not to the lower level Rest Client (that one only deals with raw requests and responses). This "opt in" behavior was introduced because it was changing the default behavior of High Level Rest Client.
For Java API client we made a different choice: since the compatibility mode is supported in Elasticsearch since version 7.14 and the Java API client was released as GA in 7.16, we decided to always send the version compatibility information to ease the future transition to Elasticsearch version 8.0 without requiring any change to application code.
Good to know, thanks.
from elasticsearch-java.
Related Issues (20)
- I can't provide a set of synonyms when creating the analyzer HOT 7
- On the issue of termvectors queries
- Regarding termvectors query related issues HOT 1
- PutSynonymResponse: Failed to decode response HOT 2
- TermsBucketBase: doc_count_error should be doc_count_error_upper_bound HOT 1
- Read By Id: Failed to decode response
- Assign a tokenizer to a field when creating an index. 8.6.0 HOT 1
- co.elastic.clients.elasticsearch.ElasticsearchClient.delete responce nullpointerexception HOT 2
- Creating aggregation from json via supplied reader HOT 1
- Building a zero result response declares missing properties as mandatory which should be optional HOT 1
- `field_masking_span` is deprecated in ES8.0+ but still used in java client HOT 4
- Cannot parse DynamicTemplate mapping with unknown field HOT 5
- Encountering NoSuchMethodError when Creating Elasticsearch Client
- PutTemplateRequest - `Unknown field 'composed_of'` HOT 1
- Snowball token filter with default language breaks `indices.get()` HOT 1
- I can't disable the 'type#name' format in the deserialization of the response HOT 1
- New lightweight http layer based on JDK 11
- New http layer based on Apache HTTP 5.x
- Support for geo distance sort on nested fields HOT 2
- JsonpMappingException thrown when parsing explicitly null co.elastic.clients.elasticsearch._types.Script from Json HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-java.