索引名称的限制长度是多少? 什么是可以在索引名称中使用的字符?
提前致谢。
答案 0 :(得分:29)
如果您尝试创建一个名称长度超过255个字符(或~100个UTF-8编码字节)的索引,您将收到类似这样的错误
InvalidIndexNameException[Invalid index name [...], index name is too long, (266 > 255)]
对于在索引中使用的有效字符,最佳查找位置是their test suite,但基本上是索引名称
#
,\
,/
,*
,?
,"
,<
, >
,|
,,
_
,-
或+
.
或..
答案 1 :(得分:3)
请参见https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-create-index.html
Lowercase only
Cannot include \, /, *, ?, ", <, >, |, ` ` (space character), ,, #
Indices prior to 7.0 could contain a colon (:), but that’s been deprecated and won’t be supported in 7.0+
Cannot start with -, _, +
Cannot be . or ..
Cannot be longer than 255 bytes (note it is bytes, so multi-byte characters will count towards the 255 limit faster)
答案 2 :(得分:2)
索引名称的最大长度为255。