|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.action.support.master.MasterNodeOperationRequest org.elasticsearch.action.admin.indices.create.CreateIndexRequest
public class CreateIndexRequest
A request to create an index. Best created with Requests.createIndexRequest(String)
.
The index created can optionally be created with settings(org.elasticsearch.common.settings.Settings)
.
IndicesAdminClient.create(CreateIndexRequest)
,
Requests.createIndexRequest(String)
,
CreateIndexResponse
Constructor Summary | |
---|---|
CreateIndexRequest(java.lang.String index)
Constructs a new request to create an index with the specified name. |
|
CreateIndexRequest(java.lang.String index,
Settings settings)
Constructs a new request to create an index with the specified name and settings. |
Method Summary | |
---|---|
CreateIndexRequest |
cause(java.lang.String cause)
The cause for this index creation. |
CreateIndexRequest |
mapping(java.lang.String type,
java.util.Map source)
Adds mapping that will be added when the index gets created. |
CreateIndexRequest |
mapping(java.lang.String type,
java.lang.String source)
Adds mapping that will be added when the index gets created. |
CreateIndexRequest |
mapping(java.lang.String type,
XContentBuilder source)
Adds mapping that will be added when the index gets created. |
void |
readFrom(StreamInput in)
|
CreateIndexRequest |
settings(java.util.Map source)
The settings to crete the index with (either json/yaml/properties format) |
CreateIndexRequest |
settings(Settings.Builder settings)
The settings to created the index with. |
CreateIndexRequest |
settings(Settings settings)
The settings to created the index with. |
CreateIndexRequest |
settings(java.lang.String source)
The settings to crete the index with (either json/yaml/properties format) |
CreateIndexRequest |
settings(XContentBuilder builder)
Allows to set the settings using a json builder. |
CreateIndexRequest |
timeout(java.lang.String timeout)
Timeout to wait for the index creation to be acknowledged by current cluster nodes. |
CreateIndexRequest |
timeout(TimeValue timeout)
Timeout to wait for the index creation to be acknowledged by current cluster nodes. |
ActionRequestValidationException |
validate()
|
void |
writeTo(StreamOutput out)
|
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequest |
---|
listenerThreaded, listenerThreaded, masterNodeTimeout, masterNodeTimeout, masterNodeTimeout |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CreateIndexRequest(java.lang.String index)
public CreateIndexRequest(java.lang.String index, Settings settings)
Method Detail |
---|
public ActionRequestValidationException validate()
public CreateIndexRequest settings(Settings settings)
public CreateIndexRequest settings(Settings.Builder settings)
public CreateIndexRequest settings(java.lang.String source)
public CreateIndexRequest settings(XContentBuilder builder)
public CreateIndexRequest settings(java.util.Map source)
public CreateIndexRequest mapping(java.lang.String type, java.lang.String source)
type
- The mapping typesource
- The mapping sourcepublic CreateIndexRequest cause(java.lang.String cause)
public CreateIndexRequest mapping(java.lang.String type, XContentBuilder source)
type
- The mapping typesource
- The mapping sourcepublic CreateIndexRequest mapping(java.lang.String type, java.util.Map source)
type
- The mapping typesource
- The mapping sourcepublic CreateIndexRequest timeout(TimeValue timeout)
public CreateIndexRequest timeout(java.lang.String timeout)
public void readFrom(StreamInput in) throws java.io.IOException
readFrom
in interface Streamable
readFrom
in class MasterNodeOperationRequest
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
writeTo
in interface Streamable
writeTo
in class MasterNodeOperationRequest
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |