Elasticsearch index.lifecycle.indexing_complete Setting

The index.lifecycle.indexing_complete setting is an Elasticsearch index-level setting that indicates whether the index has finished receiving new documents. This setting is crucial for Index Lifecycle Management (ILM) policies, particularly for controlling when certain lifecycle actions should be triggered.

  • Default value: false
  • Possible values: true or false
  • Recommendations: Set to true when you are certain that no new documents will be indexed into the index.

This setting is typically used in conjunction with ILM policies that have actions dependent on the completion of indexing. When set to true, it signals to ILM that the index is ready for subsequent lifecycle phases, such as rollover or deletion.

This setting was introduced in Elasticsearch 7.4.0 and is available in all subsequent versions.

Example Usage

To set the index.lifecycle.indexing_complete flag for an index named "my-index":

PUT /my-index/_settings
{
  "index.lifecycle.indexing_complete": true
}

Reason for change: You might set this to true when you know that an index will no longer receive new documents, allowing ILM to proceed with actions that depend on indexing completion.

Effects of change: Once set to true, ILM policies will consider the index as fully indexed and may trigger actions like rollover or deletion based on the defined policy.

Common Issues or Misuses

  1. Setting to true prematurely, preventing new documents from being indexed.
  2. Forgetting to set it to true, causing delays in ILM actions that depend on indexing completion.
  3. Manually changing the setting without considering its impact on active ILM policies.

Do's and Don'ts

Do's:

  • Set to true only when you are certain no new documents will be added to the index.
  • Use in conjunction with well-defined ILM policies.
  • Monitor indices after changing this setting to ensure desired ILM actions occur.

Don'ts:

  • Don't set to true for indices that may still receive new documents.
  • Avoid manually toggling this setting frequently, as it can interfere with ILM policy execution.
  • Don't ignore this setting when designing ILM policies that depend on indexing completion.

Frequently Asked Questions

Q: What happens if I set index.lifecycle.indexing_complete to true but then need to index more documents?
A: You can set it back to false to allow indexing, but this may disrupt ILM policy execution. It's best to be certain before setting it to true.

Q: Does setting index.lifecycle.indexing_complete to true automatically trigger ILM actions?
A: Not directly. It allows ILM actions that depend on indexing completion to proceed, but the timing depends on your ILM policy configuration.

Q: Can I use index.lifecycle.indexing_complete with time-based indices?
A: Yes, it's particularly useful for time-based indices when you know no more documents will be added for a specific time period.

Q: How does this setting interact with the rollover action in ILM?
A: When set to true, it can trigger a rollover if your ILM policy is configured to rollover based on indexing completion.

Q: Is there a way to automatically set index.lifecycle.indexing_complete to true?
A: Elasticsearch doesn't automatically set this. You need to set it manually or implement your own automation based on your indexing patterns and requirements.

Subscribe to the Pulse Newsletter

Get early access to new Pulse features, insightful blogs & exclusive events , webinars, and workshops.

We use cookies to provide an optimized user experience and understand our traffic. To learn more, read our use of cookies; otherwise, please choose 'Accept Cookies' to continue using our website.