---
title: "tours.index_document.upserted@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/tours.index_document.upserted"
updated: null
---

# tours.index\_document.upserted@1 · OpenVibe.Services

HTML: [tours.index\_document.upserted@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/tours.index_document.upserted)

# ToursIndexDocumentUpsertedPayload `tours.index_document.upserted@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: tours
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/events/payloads/tours.index_document.upserted.v1.json`](/docs/contracts/tours.index_document.upserted.json)

tours.index\_document.upserted v1 (OpenVibe.Tours server/search-index.js, via openvibe-publishing/search-feed). The OpenVibe.Search document of a Tours page: a place to see (type place, /place/<plc\_ id>, from OpenStreetMap with its kind, city and access facts), a city (type city, /city/<slug>: its Wikivoyage summary and how many places and walks it has) or a self-guided walk (type route, /routes/<rte\_ id>: its stops, distance and time). Sent by the sweep at boot and on a timer; a page that left the catalogue becomes a tombstone. The sequencer (tours\_index\_revisions) gives an unchanged document its old revision and nothing is sent. Always visibility public and publication\_state published. Facets: city, country, kind (place), stops/distance\_m/duration\_min (route), places/routes (city). Consumed by OpenVibe.Search ('\*.index\_document.\*'). Envelope: subject { type, id, revision }, visibility internal, actor service:tours.

## Fields

This schema has no named fields.

## Examples

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

 Valid: city

~~~~
{
  "owner": "tours",
  "visibility": "public",
  "authorship": "imported",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "deleted": false,
  "revision": 1,
  "type": "city",
  "id": "chongqing",
  "canonical_url": "https://openvibe.tours/city/chongqing",
  "title": "Chongqing, China",
  "summary": "A city on the Yangtze. 24 places to see and 2 self-guided walks on OpenVibe.Tours.",
  "body": "Chongqing\nChina",
  "facets": {
    "city": "chongqing",
    "country": "China",
    "places": 24,
    "routes": 2
  }
}
~~~~

Valid: place-noindex

~~~~
{
  "owner": "tours",
  "visibility": "public",
  "authorship": "imported",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "thin_content"
    ]
  },
  "deleted": false,
  "revision": 1,
  "type": "place",
  "id": "plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "canonical_url": "https://openvibe.tours/place/plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "title": "Hongya Cave",
  "summary": "An attraction in Chongqing, China. Free to visit; step-free.",
  "body": "Hongya Cave\nAttraction in Chongqing, China",
  "facets": {
    "city": "chongqing",
    "country": "China",
    "kind": "attraction"
  }
}
~~~~

Valid: place

~~~~
{
  "owner": "tours",
  "visibility": "public",
  "authorship": "imported",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "deleted": false,
  "revision": 1,
  "type": "place",
  "id": "plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "canonical_url": "https://openvibe.tours/place/plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "title": "Hongya Cave",
  "summary": "An attraction in Chongqing, China. Free to visit; step-free.",
  "body": "Hongya Cave\nAttraction in Chongqing, China",
  "facets": {
    "city": "chongqing",
    "country": "China",
    "kind": "attraction"
  }
}
~~~~

Valid: route

~~~~
{
  "owner": "tours",
  "visibility": "public",
  "authorship": "imported",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "deleted": false,
  "revision": 1,
  "type": "route",
  "id": "rte_0455T19CTMDG65FASMDB1QGYC0",
  "canonical_url": "https://openvibe.tours/routes/rte_0455T19CTMDG65FASMDB1QGYC0",
  "title": "Old town walk",
  "summary": "A self-guided walk in Chongqing: 6 stops, 3.2 km, about 90 minutes.",
  "body": "Old town walk\nChongqing",
  "facets": {
    "city": "chongqing",
    "country": "China",
    "stops": 6,
    "distance_m": 3200,
    "duration_min": 90
  }
}
~~~~

Rejected: bad-id

~~~~
{
  "owner": "tours",
  "visibility": "public",
  "authorship": "imported",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "deleted": false,
  "revision": 1,
  "type": "place",
  "id": "Hongya Cave",
  "canonical_url": "https://openvibe.tours/place/plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "title": "Hongya Cave",
  "summary": "An attraction in Chongqing, China. Free to visit; step-free.",
  "body": "Hongya Cave\nAttraction in Chongqing, China",
  "facets": {
    "city": "chongqing",
    "country": "China",
    "kind": "attraction"
  }
}
~~~~

Rejected: other-owner

~~~~
{
  "owner": "rent",
  "visibility": "public",
  "authorship": "imported",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "deleted": false,
  "revision": 1,
  "type": "place",
  "id": "plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "canonical_url": "https://openvibe.tours/place/plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "title": "Hongya Cave",
  "summary": "An attraction in Chongqing, China. Free to visit; step-free.",
  "body": "Hongya Cave\nAttraction in Chongqing, China",
  "facets": {
    "city": "chongqing",
    "country": "China",
    "kind": "attraction"
  }
}
~~~~

Rejected: other-type

~~~~
{
  "owner": "tours",
  "visibility": "public",
  "authorship": "imported",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "deleted": false,
  "revision": 1,
  "type": "hotel",
  "id": "plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "canonical_url": "https://openvibe.tours/place/plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "title": "Hongya Cave",
  "summary": "An attraction in Chongqing, China. Free to visit; step-free.",
  "body": "Hongya Cave\nAttraction in Chongqing, China",
  "facets": {
    "city": "chongqing",
    "country": "China",
    "kind": "attraction"
  }
}
~~~~

Rejected: tombstone-as-upsert

~~~~
{
  "owner": "tours",
  "type": "place",
  "id": "plc_00XKTK1QC3YQG6T8HQ6VVGESWT",
  "revision": 2,
  "deleted": true
}
~~~~

## Validate

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