> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Search data

> This guide will walk you through the process of setting up the Search Data service using a Docker image.

## Infrastructure prerequisites

Before proceeding, ensure the following components are set up:

* **Redis** - version 6.0 or higher
* **Kafka** - version 2.8 or higher
* **Elasticsearch** - version 7.11.0 or higher

## Dependencies

* **Kafka**: Used for communication with the engine
* **Elasticsearch**: Used for indexing and searching data
* **Redis**: Used for caching

## Configuration

### Kafka Configuration

Set the following Kafka-related configurations using environment variables:

* `SPRING_KAFKA_BOOTSTRAP_SERVERS`: Address of the Kafka server
* `KAFKA_TOPIC_DATA_SEARCH_IN`: The Kafka topic for the search service requests to the engine
* `KAFKA_TOPIC_DATA_SEARCH_OUT`: Where the engine awaits for the response
* `KAFKA_CONSUMER_THREADS`: Number of Kafka consumer threads

### Elasticsearch configuration

Set the following Elasticsearch-related configurations using environment variables:

* `SPRING_ELASTICSEARCH_REST_URIS`
* `SPRING_ELASTICSEARCH_REST_DISABLESSL`
* `SPRING_ELASTICSEARCH_REST_USERNAME`
* `SPRING_ELASTICSEARCH_REST_PASSWORD`
* `SPRING_ELASTICSEARCH_INDEX_SETTINGS_NAME` (default: `process-instance`) Customize the index for Search Data service, similar to the [Process Engine configuration](./flowx-engine-setup-guide/configuring-elasticsearch-indexing/)

```yaml theme={"dark"}
spring:
  elasticsearch:
    rest:
      uris: http://localhost:9200
      disableSsl: false
      username: ""
      password: ""
    index-settings:
      name: process_instance
```

### Authorization & Access Roles Configuration

Set the following environment variables to connect to the identity management platform:

* `SECURITY_OAUTH2_BASE_SERVER_URL`
* `SECURITY_OAUTH2_CLIENT_CLIENT_ID`
* `SECURITY_OAUTH2_REALM`

### Logging Configuration

Control log levels using these environment variables:

* `LOGGING_LEVEL_ROOT`: For root spring boot microservice logs
* `LOGGING_LEVEL_APP`: For app-level logs

### Elasticsearch

Data search in Elasticsearch operates against an index pattern representing multiple indices. The index pattern is derived from the configuration property `spring.elasticsearch.index-settings.name`.

Here's an example filter for use in Kibana (generated by data search):

```json theme={"dark"}
{
  "query": {
    "bool": {
      "adjust_pure_negative": true,
      "boost": 1,
      "must": [
        {
          "nested": {
            "boost": 1,
            "ignore_unmapped": false,
            "path": "keyIdentifiers",
            "query": {
              "bool": {
                "adjust_pure_negative": true,
                "boost": 1,
                "must": [
                  {
                    "match": {
                      "keyIdentifiers.key.keyword": {
                        "auto_generate_synonyms_phrase_query": true,
                        "boost": 1,
                        "fuzzy_transpositions": true,
                        "lenient": false,
                        "max_expansions": 50,
                        "operator": "OR",
                        "prefix_length": 0,
                        "query": "astonishingAttribute",
                        "zero_terms_query": "NONE"
                      }
                    }
                  },
                  {
                    "match": {
                      "keyIdentifiers.originalValue.keyword": {
                        "auto_generate_synonyms_phrase_query": true,
                        "boost": 1,
                        "fuzzy_transpositions": true,
                        "lenient": false,
                        "max_expansions": 50,
                        "operator": "OR",
                        "prefix_length": 0,
                        "query": "OriginalGangsta",
                        "zero_terms_query": "NONE"
                      }
                    }
                  }
                ]
              }
            },
            "score_mode": "none"
          }
        },
        {
          "terms": {
            "boost": 1,
            "processDefinitionName.keyword": [
              "TEST_PORCESS_NAME_0",
              "TEST_PORCESS_NAME_1"
            ]
          }
        }
      ]
    }
  }
}
```

<Info>
  Kibana is an open-source data visualization and exploration tool designed primarily for Elasticsearch. It serves as the visualization layer for the Elastic Stack, allowing users to interact with their data stored in Elasticsearch to perform various activities such as querying, analyzing, and visualizing data.

  For more information about Kibana and its capabilities, visit the [**Kibana official documentation**](https://www.elastic.co/guide/en/kibana/current/index.html). This resource provides in-depth guidance, tutorials, and documentation on how to use Kibana effectively for data visualization, analysis, and dashboard creation.
</Info>


## Related topics

- [Deployment guidelines v5.6.0](/release-notes/v5.x/v5.6.0-march-2026/deployment-guidelines-v5.6.md)
- [Update environment variables](/release-notes/v5.x/v5.0.0-july-2025/migrating-from-v4.7.x-to-5.0/environment-variables.md)
- [FlowX.AI 5.3.0 Release Notes](/release-notes/v5.x/v5.3.0-december-2025/v5.3.0-december-2025.md)
- [Prerequisites](/release-notes/v5.x/v5.1.x-lts/v5.1.0-october-2025/migrating-from-v4.7.x-to-5.1/prerequisites.md)
