版本: 6.8-7.15
简要来说,当您尝试执行一个不被允许的 Elasticsearch 别名操作时,会出现此错误。Elasticsearch 中的别名是用于引用一个或多个索引的辅助名称。然而,某些操作是不被允许的,例如创建与现有别名同名的索引,或者尝试直接删除别名。要解决此问题,您可以重命名别名或索引,或者直接在实际索引上执行操作,而不是通过别名。
日志上下文 #
日志"Alias requests are not allowed for"的类名是 IndicesAliasesRequestInterceptor.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
indicesAccessControl.getIndexPermissions(index);
if (indexAccessControl != null) {
final boolean fls = indexAccessControl.getFieldPermissions().hasFieldLevelSecurity();
final boolean dls = indexAccessControl.getDocumentPermissions().hasDocumentLevelPermissions();
if ((fls || dls) && licenseChecker.get()) {
listener.onFailure(new ElasticsearchSecurityException("Alias requests are not allowed for " +
"users who have field or document level security enabled on one of the indices";
RestStatus.BAD_REQUEST));
return;
}
}





