简体   繁体   English

如何使用 spring-data-elasticsearch 在 ES 中实现索引翻转属性/条件

[英]How to implement index rollover properties/condition in ES using spring-data-elasticsearch

How can I add the following property values in elastic search when using spring-data-elasticsearch?使用 spring-data-elasticsearch 时如何在 elasticsearch 中添加以下属性值?

  1. The maximum size or age at which you want to roll over to a new index.要滚动到新索引的最大大小或年龄。
  2. The point at which the index is no longer being updated and the number of primary shards can be reduced.不再更新索引并且可以减少主分片数量的点。
  3. When to force a merge to permanently delete documents marked for deletion.何时强制合并以永久删除标记为删除的文档。
  4. The point at which the index can be moved to less performant hardware.索引可以移动到性能较低的硬件的点。
  5. The point at which the availability is not as critical and the number of replicas can be reduced.可用性不那么关键并且可以减少副本数量的点。
  6. When the index can be safely deleted.何时可以安全删除索引。

Currently, I creating dynamic index name using:目前,我使用以下方法创建动态索引名称:

@Document(indexName = "#{@esConfig.getIndexName()}", shards = 1, replicas = 0, refreshInterval = "5s", createIndex = false) @Document(indexName = "#{@esConfig.getIndexName()}", shards = 1, replicas = 0, refreshInterval = "5s", createIndex = false)

Index lifecycle Actions are currently not supported in Spring Data Elasticsearch. Spring 数据 Elasticsearch 目前不支持索引生命周期操作。

You'd need to implement this using the functions that the Elasticsearch client offers.您需要使用 Elasticsearch 客户端提供的功能来实现它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 spring-data-elasticsearch 中使用 POJO 更新嵌套字段 - How to update nested field using POJO in spring-data-elasticsearch 如何使用 spring-data-elasticsearch 存储 java 枚举 - How to store java enums using spring-data-elasticsearch 如何使用 spring-data-elasticsearch 中的聚合获取 elasticsearch json 响应? - How to get the elasticsearch json response using aggregations in spring-data-elasticsearch? 使用带有嵌套对象的Criteria的spring-data-elasticsearch - spring-data-elasticsearch using Criteria with nested Objects 在spring-data-elasticsearch中使用ElasticsearchTemplate获取计数和ID列表 - Getting count and list of ids using ElasticsearchTemplate in spring-data-elasticsearch 如何使用 spring-data-elasticsearch 从搜索结果中获取版本 - How to fetch version from search results using spring-data-elasticsearch 如何在 spring-data-elasticsearch 中将“或”运算符与 CriteriaQuery 一起使用 - how to use "or" operator with CriteriaQuery in spring-data-elasticsearch 在spring-data-elasticsearch Java API中使用两个过滤器进行搜索 - search using two filters in spring-data-elasticsearch java api 如何在Spring-data-elasticsearch中禁用页面查询 - how to disable page query in Spring-data-elasticsearch 如何在 Spring-data-elasticsearch 中启用查询日志记录 - How to enable query logging in Spring-data-elasticsearch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM