java.lang.Object
org.elasticsearch.script.field.WriteField
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAppends a value to this path.Remove all duplicate values from this path.doc()
Append aNestedDocument
to this field and return it.doc
(int index) Returns aNestedDocument
at 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 allNestedDocument
s in this field.boolean
exists()
Does the path exist?Get the value at the given index at this path or if there is no such value.Get the value at this path, if there is no value then get the providedgetName()
Get the path represented by this Fieldboolean
Is there any value matching at this path?boolean
isEmpty()
Is this path associated with any values?iterator()
Iterate through all elements of this pathThe painless API formove
, delegates tomove(String)
ormove(WriteField)
, throws anIllegalArgumentException
if is neither aString
nor aWriteField
.Move this path to another path in the map.move
(WriteField path) Move this path to the path of the givenWriteField
, using thatWriteField
s root, which may be aNestedDocument
.The painless API foroverwrite
, delegates tooverwrite(String)
oroverwrite(WriteField)
, throws anIllegalArgumentException
if is neither aString
nor 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 thatWriteField
s root, which may be aNestedDocument
.void
remove()
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.int
size()
How many elements are at the leaf of this path?Update each value at this path with theFunction
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
WriteField
-
-
Method Details
-
getName
Get the path represented by this Field -
exists
public boolean exists()Does the path exist? -
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 thatWriteField
s root, which may be aNestedDocument
.- Throws:
IllegalArgumentException
- if the other path has contents
-
move
The painless API formove
, delegates tomove(String)
ormove(WriteField)
, throws anIllegalArgumentException
if is neither aString
nor 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 thatWriteField
s 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 anIllegalArgumentException
if is neither aString
nor 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. -
isEmpty
public boolean isEmpty()Is this path associated with any values? -
size
public int size()How many elements are at the leaf of this path? -
iterator
Iterate through all elements of this path -
get
Get the value at this path, if there is no value then get the provided -
get
Get the value at the given index at this path or if there is no such value. -
hasValue
Is there any value matching at this path? -
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 aNestedDocument
to this field and return it. -
doc
Returns aNestedDocument
at 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 allNestedDocument
s in this field.
-