opensearch-project/OpenSearch

Rollover - min_docs condition

Open

#6,780 opened on Mar 21, 2023

View on GitHub
 (2 comments) (0 reactions) (1 assignee)Java (1,505 forks)batch import
CCIdistributed frameworkenhancementgood first issue

Repository metrics

Stars
 (8,123 stars)
PR merge metrics
 (Avg merge 5d 9h) (266 merged PRs in 30d)

Description

Is your feature request related to a problem? Please describe. Currently Rollover API supports maxAge, maxSize and maxDocs conditions. When maxAge condition is used we could easily get in situation where index is rolled over, even tho it had 0 or very few documents.

Describe the solution you'd like Add minDocs condition, which would prevent rollover until specified number of documents is present in index.

Describe alternatives you've considered call Search API to count documents in index, before calling Rollover API.

Additional context Alerting, SA and ISM plugins are using rollover API in its "index management job" logic for some plugin indices.

Contributor guide