|
|||||||||
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.util.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,
JsonBuilder 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. |
void |
readFrom(StreamInput in)
|
CreateIndexRequest |
settings(Settings.Builder settings)
The settings to created the index with. |
CreateIndexRequest |
settings(Settings settings)
The settings to created the index with. |
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 |
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 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, JsonBuilder source)
type
- The mapping typesource
- The mapping sourcepublic CreateIndexRequest timeout(TimeValue 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 |