Skip to content

Expose whether a partial update was ignored (target doc missing) via vespa-feed-client Result #37132

Description

@yoshiaki-indeed

Is your feature request related to a problem? Please describe.
We perform partial update operations through the vespa-feed-client Java library. When the target document does not exist in an index, the operation is quietly ignored. It would be nice to have a way to know whether the operation was applied or ignored. This isn't a blocker for us — more of a quality-of-life improvement.

To be clear about scope: we are not asking for auto-create behavior. Setting create=true would make the partial update create the missing document, which is not what we want — we want the document to remain absent and to learn that the update was skipped.

A workaround we found is to issue a conditional update with a dummy condition "true" and check the HTTP response code (200 vs 412). This works, but it adds per-operation overhead, changes the operation's semantics (full condition evaluation on every update), and is awkward to thread through the feed client. We're curious whether a more appropriate solution would be possible.

We also looked into the X-Vespa-Ignored-Operation HTTP header, but it does not cover our case. The following partial update (using a sample app schema) is ignored when the target index is empty, yet in Vespa 8.697.20 the response contains no such header. The header is also not surfaced by the vespa-feed-client library.

$ curl -i -X PUT -H "Content-Type:application/json" --data '
  {
      "fields": {
          "title": {
              "assign": "test"
          }
      }
  }' \
  http://localhost:8080/document/v1/news/news/docid/testdoc1

HTTP/1.1 200 OK
Date: Tue, 02 Jun 2026 07:22:11 GMT
Vary: Accept-Encoding
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked

{"pathId":"/document/v1/news/news/docid/testdoc1","id":"id:news:news::testdoc1"}

Describe the solution you'd like

  1. Provide a clear signal that a partial update was ignored because the target document did not exist — either by extending X-Vespa-Ignored-Operation to cover this case or by introducing a dedicated header.
  2. Surface that signal in the vespa-feed-client ai.vespa.feed.client.Result API, since the header information is not currently exposed there. There would be a method returning boolean or an equivalent enum.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions