java.lang.Object
org.elasticsearch.script.field.SourceMapField
org.elasticsearch.script.field.WriteField
-
Field Summary
Fields inherited from class org.elasticsearch.script.field.SourceMapField
container, leaf, MISSING, path, rootSupplier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAppends a value to this path.Remove all duplicate values from this path.doc()Append aNestedDocumentto this field and return it.doc(int index) Returns aNestedDocumentat the index, if index is beyond the end of the List, creates empty NestedDocument through the end of the array to the index.docs()Iterable over allNestedDocuments in this field.getListIterator(List<?> list) Get an iterator for the given list that cannot mutate the underlying list.The painless API formove, delegates tomove(String)ormove(WriteField), throws anIllegalArgumentExceptionif is neither aStringnor aWriteField.Move this path to another path in the map.move(WriteField path) Move this path to the path of the givenWriteField, using thatWriteFields root, which may be aNestedDocument.The painless API foroverwrite, delegates tooverwrite(String)oroverwrite(WriteField), throws anIllegalArgumentExceptionif is neither aStringnor aWriteField.Move this path to another path in the map, overwriting the destination path if it exists.overwrite(WriteField path) Move this path to the path represented by anotherWriteField, using thatWriteFields root, which may be aNestedDocument.voidremove()Removes this path from the map.removeValue(int index) Remove the value at , if it exists.removeValuesIf(Predicate<Object> filter) Remove all values at this path that match .Sets the value for this path.Update each value at this path with theFunction.Methods inherited from class org.elasticsearch.script.field.SourceMapField
exists, get, get, getName, hasValue, isEmpty, iterator, resolveDepthFlat, setPath, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
WriteField
-
-
Method Details
-
move
Move this path to another path in the map.- Throws:
IllegalArgumentException- if the other path has contents
-
move
Move this path to the path of the givenWriteField, using thatWriteFields root, which may be aNestedDocument.- Throws:
IllegalArgumentException- if the other path has contents
-
move
The painless API formove, delegates tomove(String)ormove(WriteField), throws anIllegalArgumentExceptionif is neither aStringnor aWriteField. This is necessary because Painless does not support method overloading, only arity overloading. -
overwrite
Move this path to another path in the map, overwriting the destination path if it exists. If this Field has no value, the value at is removed. -
overwrite
Move this path to the path represented by anotherWriteField, using thatWriteFields root, which may be aNestedDocument. Overwrites the destination path if it exists. If this Field has no value, the value at is removed. -
overwrite
The painless API foroverwrite, delegates tooverwrite(String)oroverwrite(WriteField), throws anIllegalArgumentExceptionif is neither aStringnor aWriteField. This is necessary because Painless does not support method overloading, only arity overloading. -
remove
public void remove()Removes this path from the map. -
set
Sets the value for this path. Creates nested path if necessary. -
append
Appends a value to this path. Creates the path and the List at the leaf if necessary. -
getListIterator
Description copied from class:SourceMapFieldGet an iterator for the given list that cannot mutate the underlying list. Subclasses can override this method to allow for mutating iterators.- Overrides:
getListIteratorin classSourceMapField- Parameters:
list- the list to get an iterator for- Returns:
- an iterator that cannot mutate the underlying list
-
transform
Update each value at this path with theFunction. -
deduplicate
Remove all duplicate values from this path. List order is not preserved. -
removeValuesIf
Remove all values at this path that match . If there is only one value and it matches , the mapping is removed, however empty Lists are retained. -
removeValue
Remove the value at , if it exists. If there is only one value and is zero, remove the mapping. -
doc
Append aNestedDocumentto this field and return it. -
doc
Returns aNestedDocumentat the index, if index is beyond the end of the List, creates empty NestedDocument through the end of the array to the index. -
docs
Iterable over allNestedDocuments in this field.
-