Skip to main content
Version: Next

Index Configuration

Configure Elasticsearch/OpenSearch index settings directly via Symfony configuration. This customizes analyzers, tokenizers, and other index-level settings for all indices created by the bundle. The bundle ships sensible defaults for everything you do not override.

Configuration Structure

Define index settings under the indexing_options.index_settings key in your Symfony config (for example, config/enterprise/data_hub.yaml):

pimcore_data_hub_simple_rest:
indexing_options:
index_settings:
mapping:
total_fields:
limit: 2000
number_of_replicas: 0
max_ngram_diff: 30
analysis:
analyzer:
path_analyzer:
tokenizer: path_tokenizer
datahub_ngram_analyzer:
tokenizer: datahub_ngram_tokenizer
filter: [lowercase]
datahub_whitespace_analyzer:
tokenizer: datahub_whitespace_tokenizer
filter: [lowercase]
tokenizer:
path_tokenizer:
type: path_hierarchy
datahub_ngram_tokenizer:
type: ngram
min_gram: 3
max_gram: 25
token_chars: [letter, digit]
datahub_whitespace_tokenizer:
type: whitespace

Override any of these settings in your project config. Omitted values fall back to the bundle's built-in defaults.

How It Works

  • index_settings is a Symfony VariableNodeDefinition, so it accepts any valid Elasticsearch/OpenSearch index setting.
  • The settings are applied to all index creation and update operations.

Example: Overriding a Setting

To change the number of replicas for all indices:

pimcore_data_hub_simple_rest:
indexing_options:
index_settings:
number_of_replicas: 2