Indexer fails to create/index when deploying with a new ElasticSearch instance
I Stood up a fresh ElasticSearch 7 and this is when the problems started. It seems the reason the int tests are passing on GL is that if schemas are already registered in ES, new indexes can be created with no issue. However on a fresh infrastructure deployment, we see the following issue:
Shortened Stack Trace:
2021-03-10 16:48:45.357 ERROR 19 --- [-nio-443-exec-6] o.o.o.c.common.logging.DefaultLogWriter : indexer.app: Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [_doc]: No handler for type [flattened] declared on field [tags]] AppException(error=AppError(code=500, reason=Unknown error, message=An unknown error has occurred., errors=null, debuggingInfo=null, originalException=ElasticsearchStatusException[Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [_doc]: No handler for type [flattened] declared on field [tags]]]; nested: ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=No handler for type [flattened] declared on field [tags]]];), originalException=ElasticsearchStatusException[Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [_doc]: No handler for type [flattened] declared on field [tags]]]; nested: ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=No handler for type [flattened] declared on field [tags]]];) at org.opengroup.osdu.indexer.service.IndexerServiceImpl.processRecordChangedMessages(IndexerServiceImpl.java:153) at org.opengroup.osdu.indexer.api.RecordIndexerApi.indexWorker(RecordIndexerApi.java:79)