)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"9b80c5cdb94ec4b2b2345ab775f927f6d7db41f6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix for metadef events failing in listener service"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I3347e70dbc63837f139ab5c65693948fbf2b7afd"},{"line_number":10,"context_line":"Closes-Bug: #1490697"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da20952f_89a7894f","line":10,"updated":"2015-09-03 18:39:57.000000000","message":"This bug looks unrelated, about glanceclient\u0027s upgrade","commit_id":"54ef881686a0ad98b6072e9724579462749c686d"}],"searchlight/elasticsearch/plugins/glance/metadefs_notification_handler.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"9b80c5cdb94ec4b2b2345ab775f927f6d7db41f6","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def update_entity(self, id, entity, entity_data, entity_id, field_name):"},{"line_number":190,"context_line":"        entity_id \u003d entity_id.lower()"},{"line_number":191,"context_line":"        script \u003d (\"obj\u003dnull; for(item in ctx._source.%(entity)s)\""},{"line_number":192,"context_line":"                  \"{if(item[\u0027%(field_name)s\u0027].toLowerCase() \""},{"line_number":193,"context_line":"                  \" \u003d\u003d entity_id ) obj\u003ditem;};\""},{"line_number":194,"context_line":"                  \"if(obj!\u003dnull)ctx._source.%(entity)s.remove(obj);\""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_ac5cdb19","line":191,"updated":"2015-09-03 18:39:57.000000000","message":"This will be dependent on the scripting language in an e-s install. Elasticsearch 1.4 transitioned from MVEL to Groovy as the default; the old syntax here is MVEL.This change makes sense if installations will be new. I would be happier reindexing things rather than using update logic though; this looks fragile and hard to maintain.","commit_id":"54ef881686a0ad98b6072e9724579462749c686d"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"f5c2f8d3787d3318d70d37a1ceec6032c0ece2e4","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def update_entity(self, id, entity, entity_data, entity_id, field_name):"},{"line_number":190,"context_line":"        entity_id \u003d entity_id.lower()"},{"line_number":191,"context_line":"        script \u003d (\"obj\u003dnull; for(item in ctx._source.%(entity)s)\""},{"line_number":192,"context_line":"                  \"{if(item[\u0027%(field_name)s\u0027].toLowerCase() \""},{"line_number":193,"context_line":"                  \" \u003d\u003d entity_id ) obj\u003ditem;};\""},{"line_number":194,"context_line":"                  \"if(obj!\u003dnull)ctx._source.%(entity)s.remove(obj);\""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_9165341f","line":191,"in_reply_to":"da20952f_ac5cdb19","updated":"2015-09-05 12:17:51.000000000","message":"There is no other option currently than using scripts for updating a single element within an array of objects of json. Reindexing could be a possibility with a performance hit on API server. One way to avoid that would be to fetch all the data from ES server itself and do a reindex on the updated json with the new element. Lets talk about this in the meeting and create a new enhancement request if required.","commit_id":"54ef881686a0ad98b6072e9724579462749c686d"}]}
