在 elasticsearch 中编写索引的最有效方式是什么?

What is most efficient way of writing on an index in elasticsearch?

我目前正在设计索引架构和索引模式。在索引上写 30 天是否可取?我正在进行命名空间级索引,因此命名空间中的流量非常少 Elasticsearch 文档建议分片的大小为 20-50GB。该指数达到这个标记需要大约 30 天的时间。这是否可取?

如果您有基于时间的数据,一旦索引达到该大小,official recommendation is to keep writing your documents to time-based indexes up to a certain size (between 10GB and 50GB) and then have Index Lifecycle Management 将转至新索引。

处理时间序列数据的新方法是利用 data streams,它处理创建新索引的所有细节,滚动到它们并提供对所有底层的高级读取访问权限历史指标。