|
||||||||||
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
Field Summary |
---|
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequest |
---|
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout |
Constructor Summary | |
---|---|
CreateIndexRequest(String index)
Constructs a new request to create an index with the specified name. |
|
CreateIndexRequest(String index,
Settings settings)
Constructs a new request to create an index with the specified name and settings. |
Method Summary | |
---|---|
CreateIndexRequest |
cause(String cause)
The cause for this index creation. |
CreateIndexRequest |
custom(IndexMetaData.Custom custom)
|
CreateIndexRequest |
index(String index)
|
CreateIndexRequest |
mapping(String type,
Map source)
Adds mapping that will be added when the index gets created. |
CreateIndexRequest |
mapping(String type,
String source)
Adds mapping that will be added when the index gets created. |
CreateIndexRequest |
mapping(String type,
XContentBuilder source)
Adds mapping that will be added when the index gets created. |
CreateIndexRequest |
masterNodeTimeout(TimeValue timeout)
A timeout value in case the master has not been discovered yet or disconnected. |
void |
readFrom(StreamInput in)
|
CreateIndexRequest |
settings(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(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 |
source(byte[] source)
Sets the settings and mappings as a single source. |
CreateIndexRequest |
source(byte[] source,
int offset,
int length)
|
CreateIndexRequest |
source(BytesReference source)
Sets the settings and mappings as a single source. |
CreateIndexRequest |
source(Map<String,Object> source)
Sets the settings and mappings as a single source. |
CreateIndexRequest |
source(String source)
Sets the settings and mappings as a single source. |
CreateIndexRequest |
source(XContentBuilder source)
Sets the settings and mappings as a single source. |
CreateIndexRequest |
timeout(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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CreateIndexRequest(String index)
public CreateIndexRequest(String index, Settings settings)
Method Detail |
---|
public ActionRequestValidationException validate()
public CreateIndexRequest index(String index)
public CreateIndexRequest settings(Settings settings)
public CreateIndexRequest settings(Settings.Builder settings)
public CreateIndexRequest settings(String source)
public CreateIndexRequest settings(XContentBuilder builder)
public CreateIndexRequest settings(Map source)
public CreateIndexRequest mapping(String type, String source)
type
- The mapping typesource
- The mapping sourcepublic CreateIndexRequest cause(String cause)
public CreateIndexRequest mapping(String type, XContentBuilder source)
type
- The mapping typesource
- The mapping sourcepublic CreateIndexRequest mapping(String type, Map source)
type
- The mapping typesource
- The mapping sourcepublic CreateIndexRequest source(String source)
public CreateIndexRequest source(XContentBuilder source)
public CreateIndexRequest source(byte[] source)
public CreateIndexRequest source(byte[] source, int offset, int length)
public CreateIndexRequest source(BytesReference source)
public CreateIndexRequest source(Map<String,Object> source)
public CreateIndexRequest custom(IndexMetaData.Custom custom)
public CreateIndexRequest timeout(TimeValue timeout)
public CreateIndexRequest timeout(String timeout)
public CreateIndexRequest masterNodeTimeout(TimeValue timeout)
masterNodeTimeout
in class MasterNodeOperationRequest
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class MasterNodeOperationRequest
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class MasterNodeOperationRequest
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |