SearchQuery search.query@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
search
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/search/query.v1.json

search.query@1: the query string of GET /api/v1/search (and, with q/owner/type/limit only, GET /api/v1/suggest), capabilities search.query.run and search.query.delegate. Who sees what is decided by Search per hit: anonymous callers get public, published, indexable documents; a person also restricted documents naming them; a delegating service passes X-OV-Subject. Filters narrow; they never widen visibility.

Fields

FieldTypeRequiredDescriptionConstraints
qstringWords to match (FTS5; empty lists by recency).
  • maxLength 200
ownerstringOne owner service (live, community, wiki, …).
  • pattern ^[a-z][a-z0-9_-]{0,31}$
typestringOne document type within the owner (channel, vod, thread, …).
  • pattern ^[a-z][a-z0-9_-]{0,31}$
langstringBCP 47 language.
  • pattern ^[a-zA-Z]{2,3}(-[A-Za-z0-9]{2,8})*$
facetsstringComma-separated facet keys to count over what the caller can see.
  • maxLength 400
limitinteger | string
  • pattern ^[0-9]{1,3}$
  • minimum 1
  • maximum 100
cursorstringnext_cursor of the previous page.
  • maxLength 512

Examples

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

Valid: filtered
{
  "q": "minecraft",
  "owner": "live",
  "type": "vod",
  "limit": "24",
  "facet.channel": "alex",
  "facets": "category,channel"
}
Rejected: bad-facet-key
{
  "q": "x",
  "facet.Bad Key": "y"
}

Validate

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