diff options
author | Tor Egge <Tor.Egge@oath.com> | 2018-08-16 10:11:34 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2018-08-16 10:11:34 +0000 |
commit | 2c98f2ee50144b4f274b8474bc148aa80d59011e (patch) | |
tree | f3443b5f07933fdd4cd516311d1f369d1afd6bff /document/src | |
parent | 9bf4c6a5c602f3ae72f18dff295d774390fc4e12 (diff) |
Add example in comment for remove field path update class.
Diffstat (limited to 'document/src')
-rw-r--r-- | document/src/main/java/com/yahoo/document/fieldpathupdate/RemoveFieldPathUpdate.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/document/src/main/java/com/yahoo/document/fieldpathupdate/RemoveFieldPathUpdate.java b/document/src/main/java/com/yahoo/document/fieldpathupdate/RemoveFieldPathUpdate.java index 13b53c58fc1..59e196eb40f 100644 --- a/document/src/main/java/com/yahoo/document/fieldpathupdate/RemoveFieldPathUpdate.java +++ b/document/src/main/java/com/yahoo/document/fieldpathupdate/RemoveFieldPathUpdate.java @@ -8,6 +8,15 @@ import com.yahoo.document.datatypes.FieldValue; import com.yahoo.document.serialization.DocumentUpdateReader; /** + * RemoveFieldPathUpdate is used to remove fields or portions of fields based on the field path supplied and optionally + * a where clause. + * + * If document type "testdoc" has a field "ivec" which is an array of integers, then the field path and where clause + * to remove all array elements having the value 5 is "ivec[$x]" and "testdoc.ivec[$x] == 5". + * + * If document type "testdoc" has a field "svec" which is an array of struct containing an integer field "ival" then + * "svec[$x]" and "testdoc.svec[$x].ival == 5" can be used to remove all array elements where ival is 5. + * * @author <a href="mailto:thomasg@yahoo-inc.com">Thomas Gundersen</a> */ public class RemoveFieldPathUpdate extends FieldPathUpdate { |