What are the rules for index names in Elastic Search?

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

  • must not contain the characters #, \, /, *, ?, ", <, >, |, ,
    • Since ES 7.0 onwards, : is not allowed as well
  • must not start with _, - or +
  • must not be . or ..
  • must be lowercase

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)