Class RandomCreateIndexGenerator


  • public final class RandomCreateIndexGenerator
    extends java.lang.Object
    • Method Detail

      • randomCreateIndexRequest

        public static CreateIndexRequest randomCreateIndexRequest()
                                                           throws java.io.IOException
        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.
        Throws:
        java.io.IOException
      • randomMapping

        public static XContentBuilder randomMapping​(java.lang.String type)
                                             throws java.io.IOException
        Creates a random mapping, with the mapping definition nested under the given type name.
        Throws:
        java.io.IOException
      • randomMappingFields

        public static void randomMappingFields​(XContentBuilder builder,
                                               boolean allowObjectField)
                                        throws java.io.IOException
        Adds random mapping fields to the provided XContentBuilder
        Throws:
        java.io.IOException
      • randomAlias

        public static Alias randomAlias()