After that I create an index with matching pattern. But the index hits the 1000 limit. If I put the setting directly on the index it works. And in the Kibana I can see the setting is set on the template.
I don't interact with ES directly. I am using a JS library to create templates and indices. I can see in Kibana that the setting is set in the template. I also see that Kibana shows my template as legacy.
If you are using legacy templates the format is different and you send it to a different endpoint. One of the differences is that priority is replaced by order.
There is an order field which I did not fill. I thought it is used when there are other templates but to my knowledge we have only the one I made with a matching pattern. Now should I set it like to 100 or something?
Yes, that is the first thing I would try. Once it has been uploaded I would then list all templates and see if there are any other templates that could apply to the index being created and adjust the order so the new template takes effect.
No use. I set order to 500 and PUT the template. Made sure the order is set in Kibana. Then created the index with a new suffix. But index settings in Kibana shows the setting is still set to 1000. And there are no other template matching the index name.
Please show the full template here (as it exists in Elasticsearch) so the issue can be recreated. As you are using the legacy format you also need to check if there are any new style index templates that match, as new style templates take precedence over legacy templates.
There is a new style template there. I placed the setting in it and recreated the index. The setting had been set [were observed] in the new index. So we can conclude that the problem was that template. After that I checked the index mapping and saw it did not take it from the template. I guess we can blame that template too. But that template has no mapping. What I expected was that the mapping be taken from my legacy template (as the new style one did not contain any) but this is not the case.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.