The index creating by ElasticSearch(6.8.8) not match the configuration in code?

I hava a cluster of ES with 3 servers.
The version of ES and ik are same 6.8.8.
Dependency of spring boot:

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.2.13.RELEASE</version>
<elasticsearch.version>6.8.13</elasticsearch.version>

The configuration in code like this:

@Document(indexName = "xx", type = "_doc", shards = 3)

When the project startup,it will create index auto,whih the configuration before,and there are some logs like this :

2022-03-24 16:10:40 [WARN ] [I/O dispatcher 1] o.e.c.RestClient#logResponse:65 - request [PUT http://xxx:9200/xxx/_mapping/_doc?master_timeout=30s&include_type_name=true&timeout=30s] returned 2 warnings: [299 Elasticsearch-6.8.8-2f4c224 "'y' year should be replaced with 'u'. Use 'y' for year-of-era. Prefix your date format with '8' to use the new specifier."],[299 Elasticsearch-6.8.8-2f4c224 "[types removal] Specifying types in put mapping requests is deprecated. To be compatible with 7.0, the mapping definition should not be nested under the type name, and the parameter include_type_name must be provided and set to false."]

also there are logs in ES that can match the configuraton :

[2022-03-24T16:10:39,991][INFO ][o.e.c.m.MetaDataCreateIndexService] [node-35] [xxx] creating index, cause [api], templates [], shards [3]/[1], mappings []
[2022-03-24T16:10:40,187][INFO ][o.e.c.m.MetaDataMappingService] [node-35] [xxx/UWWdI8n1RAe1GVbKMQ1oKQ] create_mapping [_doc]
[2022-03-24T16:10:41,336][INFO ][o.e.c.r.a.AllocationService] [node-35] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[xxx][1]] ...]).

Then I delete all the indices in Kibaba.

In web page of project,I add a data that will trigger the creating of index in code.Then the index ES created with api is wrong,both the setting and mapping.
Here are the logs :

[2022-03-24T13:56:58,144][INFO ][o.e.c.m.MetaDataCreateIndexService] [node-35] [xxx] creating index, cause [auto(bulk api)], templates [], shards [5]/[1], mappings []
[2022-03-24T13:56:58,314][INFO ][o.e.c.m.MetaDataMappingService] [node-35] [xxx/c-WvlLGmTve5yxxQClvP5w] create_mapping [_doc]
[2022-03-24T13:56:58,858][INFO ][o.e.c.r.a.AllocationService] [node-35] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[patient][4]] ...]).

The one is cause(api) and another is cause(auto(bulk api)).

What should I do?

Welcome to our community! :smiley:

6.8 is EOL and no longer supported, you need to upgrade ASAP. Latest is 8.1.

Do they make the same requests to Elasticsearch?

tks for your reply.

The requests to Elasticsearch are not the same.
It's my mistake action.

tks again for u reply.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.