#34610·vespa

fieldpath update does not work for array attribute fields

Author: luoyetxCreated Aug 21, 2025Updated Aug 12, 2026

Describe the bug fieldpath update not works for array attribute fields.

To Reproduce schema

schema test_field_path {

    document test_field_path {

        field docid type long {
            indexing: attribute | summary
        }

        field arr_int type array<int> {
            indexing: attribute | summary
        }

        field summary_int type array<int> {
            indexing: summary
        }

        field arr_str type array<string> {
            indexing: attribute | summary
        }

        field summary_str type array<string> {
            indexing: summary
        }

        field arr_map type map<string, int> {
            indexing: summary
            struct-field key   { indexing: attribute }
            struct-field value { indexing: attribute }
        }

        field summary_map type map<string, int> {
            indexing: summary
        }

    }
}

first we put doc as follow

{
    "put": "id:default:test_field_path::1",
    "fields": {
        "docid": 1,
        "arr_int": [1, 2, 3],
        "summary_int": [1, 2, 3],
        "arr_str": ["a", "b", "c"],
        "summary_str": ["a", "b", "c"],
        "arr_map": {"a": 1, "b": 2, "c": 3},
        "summary_map": {"a": 1, "b": 2, "c": 3}
    }
}

then we can get the document summary as follow

{
  "pathId": "/document/v1/default/test_field_path/docid/1",
  "id": "id:default:test_field_path::1",
  "fields": {
    "summary_map": {
      "a": 1,
      "b": 2,
      "c": 3
    },
    "docid": 1,
    "summary_int": [
      1,
      2,
      3
    ],
    "summary_str": [
      "a",
      "b",
      "c"
    ],
    "arr_map": {
      "a": 1,
      "b": 2,
      "c": 3
    },
    "arr_str": [
      "a",
      "b",
      "c"
    ],
    "arr_int": [
      1,
      2,
      3
    ]
  }
}

after we put a update op as follow

{
    "update": "id:default:test_field_path::1",
    "fields": {
        "arr_int[0]": {
            "assign": 4
        },
        "summary_int[0]": {
            "assign": 4
        },
        "arr_str[0]": {
            "assign": "d"
        },
        "summary_str[0]": {
            "assign": "d"
        },
        "arr_map{a}": {
            "assign": 5
        },
        "summary_map{a}": {
            "assign": 5
        }
    }
}

we get summary as follow

{
  "pathId": "/document/v1/default/test_field_path/docid/1",
  "id": "id:default:test_field_path::1",
  "fields": {
    "summary_map": {
      "a": 5,
      "b": 2,
      "c": 3
    },
    "docid": 1,
    "summary_int": [
      4,
      2,
      3
    ],
    "summary_str": [
      "d",
      "b",
      "c"
    ],
    "arr_map": {
      "a": 5,
      "b": 2,
      "c": 3
    },
    "arr_str": [
      "a",
      "b",
      "c"
    ],
    "arr_int": [
      1,
      2,
      3
    ]
  }
}

arr_int && arr_str fields are not updated.

Expected behavior

expect arr_int && arr_str has the same values as summary_int && summary_str

this bug seems comes from the fast_access_feed_view as it updates attributes not using fieldpathupdates, and it updates attributes later after make document update only involve struct attributes.

i seems the docstore is updated but attribute fields are populated in document retriever. so we still get the old values for array types as data in memory not updated

Vespa version

latest vespa docker is used