为什么在使用spring data elasticsearch时,当应用程序启动时,head请求被发送到我的索引
2020-09-26 18:59:31.438 TRACE 92147 --- [ main] o.s.data.elasticsearch.client.WIRE : [1d806de6] Sending request GET / with parameters:
2020-09-26 18:59:32.106 TRACE 92147 --- [/O dispatcher 1] o.s.data.elasticsearch.client.WIRE : [1d806de6] Received raw response: 400 BAD_REQUEST
2020-09-26 18:59:32.480 INFO 92147 --- [ main] o.s.d.elasticsearch.support.VersionInfo : Version Spring Data Elasticsearch: 4.0.4.RELEASE
2020-09-26 18:59:32.481 INFO 92147 --- [ main] o.s.d.elasticsearch.support.VersionInfo : Version Elasticsearch Client in build: 7.6.2
2020-09-26 18:59:32.481 INFO 92147 --- [ main] o.s.d.elasticsearch.support.VersionInfo : Version Elasticsearch Client used: 7.6.2
2020-09-26 18:59:32.745 TRACE 92147 --- [ main] o.s.data.elasticsearch.client.WIRE : [65503a26] Sending request HEAD /foos?ignore_throttled=false&ignore_unavailable=false&expand_wildcards=open%2Cclosed&allow_no_indices=false with parameters:
2020-09-26 18:59:32.824 TRACE 92147 --- [/O dispatcher 2] o.s.data.elasticsearch.client.WIRE : [65503a26] Received raw response: 400 BAD_REQUEST
1条答案
按热度按时间ttygqcqt1#
初始化spring data elasticsearch存储库时
@Document
如果createIndex
属性为true。如果是(此属性的默认值),则检查索引是否已存在。这是通过向索引发出head请求来完成的。如果索引不存在,将创建索引,并写入Map。示例程序的日志输出如下所示: