What is limit length of index name? and what are characters that can use in index name?
Thanks in advance.
In Elasticsearch, an index (plural: indices) contains a schema and can have one or more shards and replicas. An Elasticsearch index is divided into shards and each shard is an instance of a Lucene index. Indices are used to store the documents in dedicated data structures corresponding to the data type of fields.
In RDBMS terms, index is a database and type can be a table which contains many rows( document in elasticsearch). You could have a different index maintaining user information, with the "name", "age" and other such fields generally attributed to a person, and a different one for blogs with "createdAt", "content", etc.
If you try to create an index with a name whose length exceeds 255 characters (or ~100 UTF-8 encoded bytes) you'll get an error like this one
InvalidIndexNameException[Invalid index name [...], index name is too long, (266 > 255)]
As for the valid characters to use in an index, the best place to look for is in their test suite, but basically an index name
#
, \
, /
, *
, ?
, "
, <
, >
, |
, ,
:
is not allowed as well_
, -
or +
.
or ..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With