geonetwork / geonetwork/core-geonetwork
Creating the features and records indexes in Elasticsearch 8.11.3 causes multiple dynamic templates config errors
- Dominant language
- Java
- Stars
- 521
- Forks
- 515
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 19
Description
**Describe the bug**
The installation [Elasticsearch compatibility docs](https://docs.geonetwork-opensource.org/4.4/install-guide/installing-index/#elasticsearch-compatibility) mention that version 8.11.3 is supported.
But, creating the `features` and `records` indexes in Elasticsearch 8.11.3 causes multiple `mapper_parsing_exception`s related to the dynamic templates configuration
**To Reproduce**
Steps to reproduce the behavior:
1. Install Elasticsearch and Kibana 8.11.3
2. Login to Kibana and go to the Dev Tools
3. Create the indices using `PUT /gn-features` and the json files located in `/opt/geonetwork/WEB-INF/data/config/index/features.json`
**Expected behavior**
Required indices can be created with errors
**Error**
The following error shows up while trying to create the features index
```
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": """Failed to parse mapping: dynamic template [dateType] has invalid content [{"match":"ft_*_d","mapping":{"format":"","type":"double"}}], attempted to validate it with the following match_mapping_type: [object, string, long, double, boolean, date, binary]"""
}
],
"type": "mapper_parsing_exception",
"reason": """Failed to parse mapping: dynamic template [dateType] has invalid content [{"match":"ft_*_d","mapping":{"format":"","type":"double"}}], attempted to validate it with the following match_mapping_type: [object, string, long, double, boolean, date, binary]""",
"caused_by": {
"type": "illegal_argument_exception",
"reason": """dynamic template [dateType] has invalid content [{"match":"ft_*_d","mapping":{"format":"","type":"double"}}], attempted to validate it with the following match_mapping_type: [object, string, long, double, boolean, date, binary]""",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "unknown parameter [format] on mapper [__dynamic__dateType] of type [double]"
}
}
},
"status": 400
}
```
**Desktop (please complete the following information):**
- Browser: Chrome, Mc
- GeoNetwork Version 4.4.2
**Additional context**
Note: The searchlogs index is created without errors
Contributor guide
Research direction
Reproduce the failure in Kibana Dev Tools with Elasticsearch 8.11.3 using the PUT /gn-features request and the JSON files under /opt/geonetwork/WEB-INF/data/config/index/, then inspect the mappings for the features and records indexes. Done means both required indexes can be created without mapper_parsing_exception errors while the existing searchlogs index behavior remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch
- Domain
- search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100