Skip to main content
Before proceeding, it is recommended to familiarize yourself with Elasticsearch and its indexing process by referring to the Intro to Elasticsearch section.

Intro to Elasticsearch

Configuration

Old configuration:
New configuration:
The flowx.indexing.optimistic-locking-retries property is available only for the HTTP indexing strategy.
The flowx.indexing.enabled property determines whether indexing with Elasticsearch is enabled. When set to false or missing, no indexing will be performed for any entities defined below. When set to true, indexing with Elasticsearch is enabled.
If the FlowX indexing configuration is set to false, the following configuration information and guidelines are not applicable to your use case.
The flowx.indexing.processInstance.indexing-type property defines the indexing strategy for process instances. It can have one of the following values:
  • no-indexing: No indexing will be performed for process instances.
  • http: Direct connection from the process engine to Elasticsearch through HTTP calls.
  • kafka: Data will be sent to be indexed via a Kafka topic using the new strategy. To implement this strategy, the Kafka Connect with Elasticsearch Sink Connector must be deployed in the infrastructure.

Configuration steps

To enable indexing with Elasticsearch for the entire application, update the process-engine configuration with the following parameters:
  • FLOWX_INDEXING_ENABLED: Set this parameter to true to enable indexing with Elasticsearch for the entire application.
  • FLOWX_INDEXING_PROCESSINSTANCE_INDEXING_TYPE: Set this parameter to kafka to use the Kafka transport strategy for indexing process instances.
  • FLOWX_INDEXING_PROCESSINSTANCE_INDEX_NAME: Specify the name of the index used for process instances.
  • FLOWX_INDEXING_PROCESSINSTANCE_SHARDS: Set the number of shards for the index.
  • FLOWX_INDEXING_PROCESSINSTANCE_REPLICAS: Set the number of replicas for the index.
For Kafka indexing, the Kafka Connect with Elasticsearch Sink Connector must be deployed in the infrastructure.
Elasticsearch Service Sink Connector

Configuration examples

Kafka Connect

  • Assumes Kafka cluster installed with Strimzi operator and Elasticsearch with eck-operator
  • Can save the image built by Kafka Connect to a local registry and comment build section

Kafka Elasticsearch connector

HTTP indexing

If you don’t want to remove the existing configuration parameters, you can use the following example:

Querying Elasticsearch

To read from multiple indices, queries in Elasticsearch have been updated. The queries now run against an index pattern that identifies multiple indices instead of a single index. The index pattern is derived from the value defined in the configuration property: flowx.indexing.processInstance.index-name

Kafka topics - process events messages

This topic is used for sending the data to be indexed from Process engine. The data from this topic will be read by Kafka Connect.
  • Key: ${kafka.topic.process.index.out}
  • Value: ${kafka.topic.naming.prefix}.core.index.process${kafka.topic.naming.suffix}
The topic name, defined in the value, will be used by Kafka Connect as source for the messages to be sent to Elasticsearch for indexing.The attribute indexLastUpdatedTime is new and will be populated for the kafka-connect strategy. This will tell the timestamp when the last operation was done on the object in the index.

Elasticsearch index template

The mappings between messages and Elasticsearch data types need to be specified through index templates. The process engine automatically handles template creation during startup, but the approach differs based on the indexing strategy:
  • When using the HTTP indexing strategy (indexing-type: http), the process engine:
    • Automatically creates the index with the template applied
    • Applies the number of shards and replicas directly from the configuration
  • When using the Kafka indexing strategy (indexing-type: kafka), the process engine:
    • Creates an index template (if it doesn’t exist) that Elasticsearch will use for dynamic index creation
    • The template applies to indices matching the pattern derived from flowx.indexing.processInstance.index-name
    • Kafka Connect creates indices dynamically based on the timestamp, and Elasticsearch applies the template automatically
    • The number of shards and replicas are set dynamically based on configuration parameters
The template creation is fully automated by the process engine. No manual intervention is required for template management. The number_of_shards and number_of_replicas values are automatically populated from your environment configuration (FLOWX_INDEXING_PROCESSINSTANCE_SHARDS and FLOWX_INDEXING_PROCESSINSTANCE_REPLICAS).
For the Kafka indexing strategy, the indexLastUpdatedTime attribute is automatically populated to track when the last operation was performed on the object in the index.

Time-based partitioning and index deletion

When working with large volumes of data, it’s recommended to implement time-based partitioning for Elasticsearch indices to improve performance and manageability.

Partitioning with Kafka vs HTTP

While both HTTP and Kafka indexing strategies support basic Elasticsearch sharding, only the Kafka strategy provides out-of-the-box support for time-based partitioning through the transforms.routeTS.timestamp.format in the Kafka Sink Connector configuration.
Time-based partitioning (creating separate indices for different time periods like daily/weekly/monthly) is not available as a built-in feature when using the HTTP indexing strategy. For efficient time-based partitioning and index lifecycle management, we recommend using the Kafka indexing strategy.

Efficient data deletion

When deleting data from Elasticsearch, it’s significantly more efficient to delete entire indices rather than deleting individual documents. This is particularly important for maintaining performance in systems with high data volumes. The Kafka indexing strategy automatically creates time-based indices that can be deleted as entire units when they’re no longer needed. This aligns well with database partitioning strategies, allowing for consistent data lifecycle management across your database and Elasticsearch. For optimal performance, align your Elasticsearch time-based partitioning with your database partitioning strategy: Here are some guidelines to help you get started:

Configuration guidelines

Last modified on July 24, 2025