---
title: "search.write-result@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/search.write-result"
updated: null
---

# search.write-result@1 · OpenVibe.Services

HTML: [search.write-result@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/search.write-result)

# SearchWriteResult `search.write-result@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: search
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/search/write-result.v1.json`](/docs/contracts/search.write-result.json)

search.write-result@1: the answer of PUT /api/v1/documents/:owner/:type/:id (search.document.write). applied: stored (or a tombstone recorded); unchanged: the same revision with the same content. A revision older than the stored one is a 409 problem search.stale\_revision; the same revision with different content is 409 search.revision\_conflict.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `outcome` | enum | yes |  | - `one of "applied", "unchanged"` |
| `revision` | integer | yes |  | - `minimum 1` |
| `stored_revision` | integer \| null |  | What Search held before this write (null: nothing). |  |
| `deleted` | boolean |  |  |  |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: applied

~~~~
{
  "outcome": "applied",
  "revision": 2,
  "stored_revision": 1,
  "deleted": false
}
~~~~

Rejected: stale-is-a-problem

~~~~
{
  "outcome": "stale",
  "revision": 1
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('search.write-result@1', value);   // { valid, errors: [{ path, message }] }
~~~~
