|
|||||||||
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
Constructor Summary | |
---|---|
PutMappingRequest(java.lang.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. |
java.lang.String[] |
indices()
The indices the mappings will be put. |
PutMappingRequest |
indices(java.lang.String[] indices)
Sets the indices this put mapping operation will execute on. |
PutMappingRequest |
mappingSource(JsonBuilder mappingBuilder)
The mapping source definition. |
PutMappingRequest |
mappingSource(java.lang.String mappingSource)
The mapping source definition. |
void |
readFrom(StreamInput in)
|
PutMappingRequest |
timeout(TimeValue timeout)
Timeout to wait till the put mapping gets acknowledged of all current cluster nodes. |
java.lang.String |
type()
The mapping type. |
PutMappingRequest |
type(java.lang.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PutMappingRequest(java.lang.String... indices)
Method Detail |
---|
public ActionRequestValidationException validate()
public PutMappingRequest indices(java.lang.String[] indices)
public java.lang.String[] indices()
public java.lang.String type()
public PutMappingRequest type(java.lang.String mappingType)
@Required public PutMappingRequest mappingSource(JsonBuilder mappingBuilder)
@Required public PutMappingRequest mappingSource(java.lang.String mappingSource)
public PutMappingRequest timeout(TimeValue 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 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 |