Must be lowercase – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch encounters a field or parameter that is not in lowercase as it expects. Elasticsearch is case-sensitive and certain fields, like index names, must be in lowercase. To resolve this issue, ensure that all your index names, field names, and other parameters are in lowercase. If you’re using a script or application to send data to Elasticsearch, consider adding a function to convert all names to lowercase before sending them.

This guide will help you check for common problems that cause the log ” must be lowercase ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: metadata, cluster.

Log Context

Log “must be lowercase” class name is MetadataCreateIndexService.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 * Validate the name for an index against some static rules and a cluster state.
 */
 public static void validateIndexName(String index; ClusterState state) {
 validateIndexOrAliasName(index; InvalidIndexNameException::new);
 if (index.toLowerCase(Locale.ROOT).equals(index) == false) {
 throw new InvalidIndexNameException(index; "must be lowercase");
 }  // NOTE: dot-prefixed index names are validated after template application; not here  if (state.routingTable().hasIndex(index)) {

 

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?