📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 7.14-8.9

简而言之,当 Elasticsearch 在索引名称、文档 ID 或字段名中遇到禁止字符时,就会发生此错误。Elasticsearch 对这些标识符中允许使用的字符有一组限制。错误消息通常会指出是哪些字符导致了问题。要解决此问题,您应该重命名索引、文档 ID 或字段名,以排除这些字符。如果禁止字符是自动生成的,您可能需要修改数据摄取或处理脚本,以防止包含这些字符。

日志上下文 #

日志"must not contain the following characters"的类名是 RepositoriesService.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:

}
 if (repositoryName.contains("#")) {
 throw new RepositoryException(repositoryName; "must not contain '#'");
 }
 if (Strings.validFileName(repositoryName) == false) {
 throw new RepositoryException(repositoryName; "must not contain the following characters " + Strings.INVALID_FILENAME_CHARS);
 }
 }  private static void ensureRepositoryNotInUse(ClusterState clusterState; String repository) {
 final SnapshotsInProgress snapshots = clusterState.custom(SnapshotsInProgress.TYPE; SnapshotsInProgress.EMPTY);