如何使用JAVA api(不使用Logstash)在elasticsearch myindexname-YYYY-MM-DD
中创建索引?
我正在使用此代码:
final CreateIndexRequest createIndexRequest = new CreateIndexRequest("myindexname");
client.indices().create(createIndexRequest, RequestOptions.DEFAULT);
答案 0 :(得分:0)
您是否查看过Elasticsearch中的转换API:https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html?