Avoid Default Index Creation without mapping

Hello everyone,
I am using elastic search 1.4.2 for storing application logs.
We have defined an index mapping, which is generally applied during deployment and upgrade process.
However, if there's anything failing at that point or there's a request to push a log/document into elastic search by that time, then elastic search creates an index with default mapping. This is what I want to avoid.
Is there a way to error all push document calls to elastic search unless index was explicitly created with mappings.
If not, I might have to apply this check explicitly all the time before pushing any log entry into elastic search.

Please advise.
Appreciate your inputs!

Regards,
Sagar

Is it a dynamic mapping or completely static?

You might be interested in the last two paragraphs in this section of the documentation, I think this might be the settings you are after: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-creation

HTH

1 Like

Mappings are static and are meant for defining the types of the fields that I want to support and applying analyzers for search.
And log entries could be coming from different applications, which might actually push data and elastic search creates a default index without analyzer.
Now on deployment side updating mapping call actually fails because index once created without mapping can not be updated with new analyzer mappings.

Please suggest.

Appreciate!

Yep. That's exactly what I was looking for.

Thanks a ton ! :slight_smile:

1 Like