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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
q | string | Words to match (FTS5; empty lists by recency). |
| |
owner | string | One owner service (live, community, wiki, …). |
| |
type | string | One document type within the owner (channel, vod, thread, …). |
| |
lang | string | BCP 47 language. |
| |
facets | string | Comma-separated facet keys to count over what the caller can see. |
| |
limit | integer | string |
| ||
cursor | string | next_cursor of the previous page. |
|
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 }] }