类 CreateIndexRequest
java.lang.Object
org.easysearch.client.TimedRequest
org.easysearch.client.indices.CreateIndexRequest
- 所有已实现的接口:
Validatable,org.easysearch.common.xcontent.ToXContent,org.easysearch.common.xcontent.ToXContentObject
public class CreateIndexRequest extends TimedRequest implements Validatable, org.easysearch.common.xcontent.ToXContentObject
A request to create an index.
-
嵌套类概要
从接口继承的嵌套类/接口 org.easysearch.common.xcontent.ToXContent
org.easysearch.common.xcontent.ToXContent.DelegatingMapParams, org.easysearch.common.xcontent.ToXContent.MapParams, org.easysearch.common.xcontent.ToXContent.Params -
字段概要
从类继承的字段 org.easysearch.client.TimedRequest
DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUT从接口继承的字段 org.easysearch.common.xcontent.ToXContent
EMPTY_PARAMS从接口继承的字段 org.easysearch.client.Validatable
EMPTY -
构造器概要
构造器 构造器 说明 CreateIndexRequest(java.lang.String index)Constructs a new request to create an index with the specified name. -
方法概要
修饰符和类型 方法 说明 CreateIndexRequestalias(org.easysearch.action.admin.indices.alias.Alias alias)Adds an alias that will be associated with the index when it gets createdjava.util.Set<org.easysearch.action.admin.indices.alias.Alias>aliases()CreateIndexRequestaliases(java.lang.String source, org.easysearch.common.xcontent.XContentType contentType)Sets the aliases that will be associated with the index when it gets createdCreateIndexRequestaliases(java.util.Collection<org.easysearch.action.admin.indices.alias.Alias> aliases)Adds aliases that will be associated with the index when it gets createdCreateIndexRequestaliases(java.util.Map<java.lang.String,?> source)Sets the aliases that will be associated with the index when it gets createdCreateIndexRequestaliases(org.easysearch.common.bytes.BytesReference source, org.easysearch.common.xcontent.XContentType contentType)Sets the aliases that will be associated with the index when it gets createdCreateIndexRequestaliases(org.easysearch.common.xcontent.XContentBuilder source)Sets the aliases that will be associated with the index when it gets createdjava.lang.Stringindex()The name of the index to create.org.easysearch.common.xcontent.XContentBuilderinnerToXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params)CreateIndexRequestmapping(java.lang.String source, org.easysearch.common.xcontent.XContentType xContentType)Adds mapping that will be added when the index gets created.CreateIndexRequestmapping(java.util.Map<java.lang.String,?> source)Adds mapping that will be added when the index gets created.CreateIndexRequestmapping(org.easysearch.common.bytes.BytesReference source, org.easysearch.common.xcontent.XContentType xContentType)Adds mapping that will be added when the index gets created.CreateIndexRequestmapping(org.easysearch.common.xcontent.XContentBuilder source)Adds mapping that will be added when the index gets created.org.easysearch.common.bytes.BytesReferencemappings()org.easysearch.common.xcontent.XContentTypemappingsXContentType()org.easysearch.common.settings.Settingssettings()The settings to create the index with.CreateIndexRequestsettings(java.lang.String source, org.easysearch.common.xcontent.XContentType xContentType)The settings to create the index with (either json or yaml format)CreateIndexRequestsettings(java.util.Map<java.lang.String,?> source)The settings to create the index with (either json/yaml/properties format)CreateIndexRequestsettings(org.easysearch.common.settings.Settings settings)The settings to create the index with.CreateIndexRequestsettings(org.easysearch.common.settings.Settings.Builder settings)The settings to create the index with.CreateIndexRequestsettings(org.easysearch.common.xcontent.XContentBuilder builder)Allows to set the settings using a json builder.CreateIndexRequestsource(java.lang.String source, org.easysearch.common.xcontent.XContentType xContentType)Sets the settings and mappings as a single source.CreateIndexRequestsource(java.util.Map<java.lang.String,?> source)Sets the settings and mappings as a single source.CreateIndexRequestsource(org.easysearch.common.bytes.BytesReference source, org.easysearch.common.xcontent.XContentType xContentType)Sets the settings and mappings as a single source.CreateIndexRequestsource(org.easysearch.common.xcontent.XContentBuilder source)Sets the settings and mappings as a single source.org.easysearch.common.xcontent.XContentBuildertoXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params)org.easysearch.action.support.ActiveShardCountwaitForActiveShards()CreateIndexRequestwaitForActiveShards(org.easysearch.action.support.ActiveShardCount waitForActiveShards)Sets the number of shard copies that should be active for index creation to return.从类继承的方法 org.easysearch.client.TimedRequest
masterNodeTimeout, setMasterTimeout, setTimeout, timeout从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.easysearch.common.xcontent.ToXContentObject
isFragment从接口继承的方法 org.easysearch.client.Validatable
validate
-
构造器详细资料
-
CreateIndexRequest
public CreateIndexRequest(java.lang.String index)Constructs a new request to create an index with the specified name.
-
-
方法详细资料
-
index
public java.lang.String index()The name of the index to create. -
settings
public org.easysearch.common.settings.Settings settings()The settings to create the index with. -
settings
The settings to create the index with. -
settings
The settings to create the index with. -
settings
public CreateIndexRequest settings(java.lang.String source, org.easysearch.common.xcontent.XContentType xContentType)The settings to create the index with (either json or yaml format) -
settings
Allows to set the settings using a json builder. -
settings
The settings to create the index with (either json/yaml/properties format) -
mappings
public org.easysearch.common.bytes.BytesReference mappings() -
mappingsXContentType
public org.easysearch.common.xcontent.XContentType mappingsXContentType() -
mapping
public CreateIndexRequest mapping(java.lang.String source, org.easysearch.common.xcontent.XContentType xContentType)Adds mapping that will be added when the index gets created. Note that the definition should *not* be nested under a type name.- 参数:
source- The mapping sourcexContentType- The content type of the source
-
mapping
Adds mapping that will be added when the index gets created. Note that the definition should *not* be nested under a type name.- 参数:
source- The mapping source
-
mapping
Adds mapping that will be added when the index gets created. Note that the definition should *not* be nested under a type name.- 参数:
source- The mapping source
-
mapping
public CreateIndexRequest mapping(org.easysearch.common.bytes.BytesReference source, org.easysearch.common.xcontent.XContentType xContentType)Adds mapping that will be added when the index gets created. Note that the definition should *not* be nested under a type name.- 参数:
source- The mapping sourcexContentType- the content type of the mapping source
-
aliases
public java.util.Set<org.easysearch.action.admin.indices.alias.Alias> aliases() -
aliases
Sets the aliases that will be associated with the index when it gets created -
aliases
Sets the aliases that will be associated with the index when it gets created -
aliases
public CreateIndexRequest aliases(java.lang.String source, org.easysearch.common.xcontent.XContentType contentType)Sets the aliases that will be associated with the index when it gets created -
aliases
public CreateIndexRequest aliases(org.easysearch.common.bytes.BytesReference source, org.easysearch.common.xcontent.XContentType contentType)Sets the aliases that will be associated with the index when it gets created -
alias
Adds an alias that will be associated with the index when it gets created -
aliases
public CreateIndexRequest aliases(java.util.Collection<org.easysearch.action.admin.indices.alias.Alias> aliases)Adds aliases that will be associated with the index when it gets created -
source
public CreateIndexRequest source(java.lang.String source, org.easysearch.common.xcontent.XContentType xContentType)Sets the settings and mappings as a single source. Note that the mapping definition should *not* be nested under a type name. -
source
Sets the settings and mappings as a single source. Note that the mapping definition should *not* be nested under a type name. -
source
public CreateIndexRequest source(org.easysearch.common.bytes.BytesReference source, org.easysearch.common.xcontent.XContentType xContentType)Sets the settings and mappings as a single source. Note that the mapping definition should *not* be nested under a type name. -
source
Sets the settings and mappings as a single source. Note that the mapping definition should *not* be nested under a type name. -
waitForActiveShards
public org.easysearch.action.support.ActiveShardCount waitForActiveShards() -
waitForActiveShards
public CreateIndexRequest waitForActiveShards(org.easysearch.action.support.ActiveShardCount waitForActiveShards)Sets the number of shard copies that should be active for index creation to return. Defaults toActiveShardCount.DEFAULT, which will wait for one shard copy (the primary) to become active. Set this value toActiveShardCount.ALLto wait for all shards (primary and all replicas) to be active before returning. Otherwise, useActiveShardCount.from(int)to set this value to any non-negative integer, up to the number of copies per shard (number of replicas + 1), to wait for the desired amount of shard copies to become active before returning. Index creation will only wait up until the timeout value for the number of shard copies to be active before returning. CheckShardsAcknowledgedResponse.isShardsAcknowledged()to determine if the requisite shard copies were all started before returning or timing out.- 参数:
waitForActiveShards- number of active shard copies to wait on
-
toXContent
public org.easysearch.common.xcontent.XContentBuilder toXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- 指定者:
toXContent在接口中org.easysearch.common.xcontent.ToXContent- 抛出:
java.io.IOException
-
innerToXContent
public org.easysearch.common.xcontent.XContentBuilder innerToXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- 抛出:
java.io.IOException
-