Package org.elasticsearch.index
Class RandomCreateIndexGenerator
- java.lang.Object
-
- org.elasticsearch.index.RandomCreateIndexGenerator
-
public final class RandomCreateIndexGenerator extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
randomAliases(CreateIndexRequest request)
Sets random aliases to the providedCreateIndexRequest
static CreateIndexRequest
randomCreateIndexRequest()
Returns a randomCreateIndexRequest
.static Settings
randomIndexSettings()
Returns aSettings
instance which include random values forIndexMetaData.SETTING_NUMBER_OF_SHARDS
andIndexMetaData.SETTING_NUMBER_OF_REPLICAS
static XContentBuilder
randomMapping(java.lang.String type)
static void
randomMappingFields(XContentBuilder builder, boolean allowObjectField)
Adds random mapping fields to the providedXContentBuilder
-
-
-
Method Detail
-
randomCreateIndexRequest
public static CreateIndexRequest randomCreateIndexRequest() throws java.io.IOException
Returns a randomCreateIndexRequest
. Randomizes the index name, the aliases, mappings and settings associated with the index.- Throws:
java.io.IOException
-
randomIndexSettings
public static Settings randomIndexSettings()
Returns aSettings
instance which include random values forIndexMetaData.SETTING_NUMBER_OF_SHARDS
andIndexMetaData.SETTING_NUMBER_OF_REPLICAS
-
randomMapping
public static XContentBuilder randomMapping(java.lang.String type) throws java.io.IOException
- Throws:
java.io.IOException
-
randomMappingFields
public static void randomMappingFields(XContentBuilder builder, boolean allowObjectField) throws java.io.IOException
Adds random mapping fields to the providedXContentBuilder
- Throws:
java.io.IOException
-
randomAliases
public static void randomAliases(CreateIndexRequest request)
Sets random aliases to the providedCreateIndexRequest
-
-