Update field in nested object


I have a nested field of objects. I have a use case where I want to edit a field within a specific nested object.

    "mappings" : {
         "item" {
             "id" : {"type" : "keyword"},
             "vendors" : {
                 "type" : "nested",
                 "properties" : {
                     "vendor_name" : {"type" : "keyword"}
                     "sku" : {"type" : "keyword"}
                     "inventory" : {"type" : "integer"}
                     "bound" : {"type" : "integer"}

I need to update properties like inventory based on a notification that someone has ordered something, so bound quantity would increment by 1. Is there a way to access a particular nested object? For example, access based on the vendor code? I've seen that I can do this by looping over the nested attributes and checking to see if one has the matching vendor code, but I am wondering if I can directly access.

Hopefully this isn't a repeat question. I've been searching blog posts and documentation and haven't found a solution for this, but it is possible I have missed something, or it is not supported.

Thanks so much!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.