Unknown alias name was passed to alias Filter – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Briefly, this error occurs when an alias (a secondary name for an index) that doesn’t exist is used in an alias filter. This could be due to a typo or the alias not being created. To resolve this issue, you can either correct the alias name if it was a typo or create the alias if it doesn’t exist. Also, ensure that the alias is associated with the correct index. It’s also important to check if the alias was accidentally deleted or not properly initialized during setup.

This guide will help you check for common problems that cause the log ” Unknown alias name was passed to alias Filter ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: alias, search, filter.

Log Context

Log “Unknown alias name was passed to alias Filter” class name is ShardSearchRequest.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 };
 if (aliasNames.length == 1) {
 AliasMetadata alias = aliases.get(aliasNames[0]);
 if (alias == null) {
 // This shouldn't happen unless alias disappeared after filteringAliases was called.
 throw new InvalidAliasNameException(index; aliasNames[0]; "Unknown alias name was passed to alias Filter");
 }
 return parserFunction.apply(alias);
 } else {
 // we need to bench here a bit; to see maybe it makes sense to use OrFilter
 BoolQueryBuilder combined = new BoolQueryBuilder();

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?