Class MetaDataCreateIndexService


  • public class MetaDataCreateIndexService
    extends java.lang.Object
    Service responsible for submitting create index requests
    • Method Detail

      • validateIndexName

        public static void validateIndexName​(java.lang.String index,
                                             ClusterState state)
        Validate the name for an index against some static rules and a cluster state.
      • validateIndexOrAliasName

        public static void validateIndexOrAliasName​(java.lang.String index,
                                                    java.util.function.BiFunction<java.lang.String,​java.lang.String,​? extends java.lang.RuntimeException> exceptionCtor)
        Validate the name for an index or alias against some static rules.
      • calculateNumRoutingShards

        public static int calculateNumRoutingShards​(int numShards,
                                                    Version indexVersionCreated)
        Returns a default number of routing shards based on the number of shards of the index. The default number of routing shards will allow any index to be split at least once and at most 10 times by a factor of two. The closer the number or shards gets to 1024 the less default split operations are supported