I'm testing out my learning of the ElasticSearch project, and found out that indices cannot start with an uppercase letter.
When I attempted to create an index with an uppercase letter, I get a HTTP 400 response.
If I attempted to create the same index, but starting with a lowercase letter, I get a HTTP 200 response.
I tried searching the docs, but I don't see anything that talks about this. Did I miss something?
I've developed my own client using the Delphi/Pascal language.
Using Windows 2008 R2 SP1.
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
The error I got was:
{"error":{"root_cause":[{"type":"invalid_index_name_exception","reason":"Invalid index name [Delphi], must be lowercase","index_uuid":"na","index":"Delphi"}],"type":"invalid_index_name_exception","reason":"Invalid index name [Delphi], must be lowercase","index_uuid":"na","index":"Delphi"},"status":400}
I agree it is not called out clearly in the documentation, and had to search a bit before finding it in the Definitive Guide.
I suspect the reason is due to the fact that the index name historically used to be present as directory names under the data directory. As Elasticsearch can be deployed on file systems that are case-insensitive, this means that case sensitive index names would not work.
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.