code | type | title | description |
---|---|---|---|
true |
page |
update |
Update the collection mapping |
You can define the collection dynamic mapping policy by setting the dynamic
field to the desired value.
You can define collection additional metadata within the _meta
root field.
public CompletableFuture<Void> update(
final String index,
final String collection,
final ConcurrentHashMap<String, Object> mapping)
Arguments | Type | Description |
---|---|---|
index |
String |
Index name |
collection |
String |
Collection name |
mapping |
ConcurrentHashMap<String, Object> |
Describes the collection mapping |
A ConcurrentHashMap<String, Object>
representing the collection data mapping.
It must have a root field properties
that contain the mapping definition:
{
mappings={
dynamic="[true|false|strict]",
_meta={
field="value"
},
properties={
field1={ type='text' },
field2={
properties={
nestedField={ type='keyword' }
}
}
}
}
};
More information about database mappings here.
Returns a CompletableFuture<Void>
.
<<< ./snippets/update.java