Created
October 29, 2014 18:42
-
-
Save rasathus/b46207391c0ee41a08e1 to your computer and use it in GitHub Desktop.
elasticsearch append to array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"script": "ctx._source.Tracking += Tracking", | |
"params": { | |
"Tracking": [ { "Timestamp": datetime.datetime.now(), "Entry": tracking['Entry'], "SystemId": system_id} ] | |
} |
Author
rasathus
commented
Oct 29, 2014
In case anyone stumbles accross this, the Status section can be overwritten via the addition of a script too.
"script": "ctx._source.Tracking += Tracking; ctx._source.Status = Status",
"params": {
"Status": entry_status_map[entry_lower],
"Tracking": [ { "Timestamp": datetime.datetime.now(), "Entry": tracking['Entry'], "SystemId": system_id} ]
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment