Class RandomCreateIndexGenerator

java.lang.Object
org.elasticsearch.index.RandomCreateIndexGenerator

public final class RandomCreateIndexGenerator extends Object
  • Method Details

    • randomCreateIndexRequest

      public static CreateIndexRequest randomCreateIndexRequest()
      Returns a random CreateIndexRequest. Randomizes the index name, the aliases, mappings and settings associated with the index. If present, the mapping definition will be nested under a type name.
    • randomIndexSettings

      public static Settings randomIndexSettings()
    • randomMapping

      public static org.elasticsearch.xcontent.XContentBuilder randomMapping(String type)
      Creates a random mapping, with the mapping definition nested under the given type name.
    • randomMappingFields

      public static void randomMappingFields(org.elasticsearch.xcontent.XContentBuilder builder, boolean allowObjectField)
      Adds random mapping fields to the provided XContentBuilder
    • randomAliases

      public static void randomAliases(CreateIndexRequest request)
      Sets random aliases to the provided CreateIndexRequest
    • randomAlias

      public static Alias randomAlias()