|
||||||||||
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.mapping.put.PutMappingRequest
public class PutMappingRequest
Puts mapping definition registered under a specific type into one or more indices. Best created with
Requests.putMappingRequest(String...)
.
If the mappings already exists, the new mappings will be merged with the new one. If there are elements
that can't be merged are detected, the request will be rejected unless the ignoreConflicts(boolean)
is set. In such a case, the duplicate mappings will be rejected.
Requests.putMappingRequest(String...)
,
IndicesAdminClient.putMapping(PutMappingRequest)
,
PutMappingResponse
Field Summary |
---|
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeOperationRequest |
---|
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout |
Constructor Summary | |
---|---|
PutMappingRequest(String... indices)
Constructs a new put mapping request against one or more indices. |
Method Summary | |
---|---|
boolean |
ignoreConflicts()
If there is already a mapping definition registered against the type, then it will be merged. |
PutMappingRequest |
ignoreConflicts(boolean ignoreDuplicates)
If there is already a mapping definition registered against the type, then it will be merged. |
String[] |
indices()
The indices the mappings will be put. |
PutMappingRequest |
indices(String[] indices)
Sets the indices this put mapping operation will execute on. |
void |
readFrom(StreamInput in)
|
PutMappingRequest |
source(Map mappingSource)
The mapping source definition. |
PutMappingRequest |
source(String mappingSource)
The mapping source definition. |
PutMappingRequest |
source(XContentBuilder mappingBuilder)
The mapping source definition. |
PutMappingRequest |
timeout(String timeout)
Timeout to wait till the put mapping gets acknowledged of all current cluster nodes. |
PutMappingRequest |
timeout(TimeValue timeout)
Timeout to wait till the put mapping gets acknowledged of all current cluster nodes. |
String |
type()
The mapping type. |
PutMappingRequest |
type(String mappingType)
The type of the mappings. |
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 PutMappingRequest(String... indices)
Method Detail |
---|
public ActionRequestValidationException validate()
public PutMappingRequest indices(String[] indices)
public String[] indices()
public String type()
@Required public PutMappingRequest type(String mappingType)
@Required public PutMappingRequest source(XContentBuilder mappingBuilder)
@Required public PutMappingRequest source(Map mappingSource)
@Required public PutMappingRequest source(String mappingSource)
public PutMappingRequest timeout(TimeValue timeout)
public PutMappingRequest timeout(String timeout)
public boolean ignoreConflicts()
ignoreConflicts(boolean)
is set. In such a case, the duplicate mappings will be rejected.
public PutMappingRequest ignoreConflicts(boolean ignoreDuplicates)
ignoreConflicts(boolean)
is set. In such a case, the duplicate mappings will be rejected.
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 |