Create-Index relevant BPC settings

When creating an OpenSearch index, the "settings" and the "mappings" are particularly relevant. These can be influenced by the three Create-Index core settings mentioned here.

Here is a complete Create-Index JSON that could be used to create an index with the name 'bpc-foobar'. This only serves to illustrate how all 3 settings would interact.

Create-Index JSON example
{
    "settings": {
        "number_of_shards": "3",
        "number_of_replicas": "1",
        "analysis": {
            "normalizer": {
                "lowercaseNormalizer": {
                    "type": "custom",
                    "char_filter": [],
                    "filter": [
                        "lowercase"
                    ]
                }
            }
        }
    },
    "mappings": {
        "dynamic_templates": [
            {
                "binaries": {
                    "mapping": {
                        "type": "binary"
                    },
                    "match_mapping_type": "string",
                    "match": "*_binary"
                }
            },
            {
                "strings": {
                    "unmatch": "*_binary",
                    "path_unmatch": "bpc-attachment-*.*",
                    "mapping": {
                        "fields": {
                            "lowercase": {
                                "normalizer": "lowercaseNormalizer",
                                "type": "keyword"
                            },
                            "raw": {
                                "type": "keyword"
                            }
                        },
                        "type": "text"
                    },
                    "match_mapping_type": "string",
                    "match": "*"
                }
            }
        ],
        "properties": {
            "id": {
                "type": "keyword"
            },
            "name": {
                "type": "text",
                "fields": {
                    "lowercase": {
                        "normalizer": "lowercaseNormalizer",
                        "type": "keyword"
                    },
                    "raw": {
                        "type": "keyword"
                    }
                }
            },
            "timestamp": {
                "type": "date"
            }
        }
    }
}

Core setting: indexTemplates

Is now the "most important" of the settings. These templates are stored directly in OpenSearch and then automatically applied by OpenSearch based on the pattern when a new index is created.

Further information can be found in the corresponding OpenSearch documentation.

Overview of all BPC index templates (legacy) registered in OpenSearch:

curl 'localhost:9200/_template/bpc:*' | jq .
Default
{
  "bpc:for_all_indices": {
    "order": 0,
    "index_patterns": [
      "*"
    ],
    "settings": {
      "number_of_shards": 1,
      "number_of_replicas": 1
    }
  },
  "bpc:for_all_bpc_indices": {
    "order": 5,
    "index_patterns": [
      "bpc-*"
    ],
    "settings": {
      "number_of_shards": 3,
      "number_of_replicas": 1
    }
  }
}

Please ensure that all template names have the prefix bpc:.

Core setting: indexCreationSettings

This is our default setting, which we set when creating a new index. The value is set when creating/creating an index as its "settings" value.

If the equivalent value is set for a replication job, this has priority.

Further information can be found in the corresponding OpenSearch documentation.

Default
{
  "analysis": {
    "normalizer": {
      "lowercaseNormalizer": {
        "type": "custom",
        "char_filter": [],
        "filter": [
          "lowercase"
        ]
      }
    }
  }
}

Core setting: indexDynamicTemplates

The value is set as "dynamic_templates" in the mappings of the fields of an index. This then ensures the dynamic determination of field types or enables the addition of subfields under fixed conditions. enables the addition of subfields under definable conditions (data type, field name).

If the equivalent value is set for a replication job, this has priority.

Further information can be found in the corresponding OpenSearch documentation.

Default
[
    {
        "binaries": {
            "mapping": {
                "type": "binary"
            },
            "match_mapping_type": "string",
            "match": "*_binary"
        }
    },
    {
        "strings": {
            "unmatch": "*_binary",
            "path_unmatch": "bpc-attachment-*.*",
            "mapping": {
                "type": "text",
                "fields": {
                    "lowercase": {
                        "normalizer": "lowercaseNormalizer",
                        "type": "keyword"
                    },
                    "raw": {
                        "type": "keyword"
                    }
                }
            },
            "match_mapping_type": "string",
            "match": "*"
        }
    }
]

Keywords: