Package org.elasticsearch.index
Class RandomCreateIndexGenerator
java.lang.Object
org.elasticsearch.index.RandomCreateIndexGenerator
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.elasticsearch.action.admin.indices.alias.Aliasstatic voidrandomAliases(org.elasticsearch.action.admin.indices.create.CreateIndexRequest request) Sets random aliases to the providedCreateIndexRequeststatic org.elasticsearch.action.admin.indices.create.CreateIndexRequestReturns a randomCreateIndexRequest.static org.elasticsearch.common.settings.SettingsReturns aSettingsinstance which include random values forIndexMetadata.SETTING_NUMBER_OF_SHARDSandIndexMetadata.SETTING_NUMBER_OF_REPLICASstatic org.elasticsearch.xcontent.XContentBuilderrandomMapping(String type) Creates a random mapping, with the mapping definition nested under the given type name.static voidrandomMappingFields(org.elasticsearch.xcontent.XContentBuilder builder, boolean allowObjectField) Adds random mapping fields to the providedXContentBuilder
-
Method Details
-
randomCreateIndexRequest
public static org.elasticsearch.action.admin.indices.create.CreateIndexRequest randomCreateIndexRequest()Returns a randomCreateIndexRequest. 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 org.elasticsearch.common.settings.Settings randomIndexSettings()Returns aSettingsinstance which include random values forIndexMetadata.SETTING_NUMBER_OF_SHARDSandIndexMetadata.SETTING_NUMBER_OF_REPLICAS -
randomMapping
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 providedXContentBuilder -
randomAliases
public static void randomAliases(org.elasticsearch.action.admin.indices.create.CreateIndexRequest request) Sets random aliases to the providedCreateIndexRequest -
randomAlias
public static org.elasticsearch.action.admin.indices.alias.Alias randomAlias()
-