Search the notes by their words and, when semantic search is on, by their meaning:
const url = 'https://example.com/datanotes/operations/search/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"query":"example","limit":10,"tables":null,"folder":null,"min_score":null}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/datanotes/operations/search/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "query": "example", "limit": 10, "tables": null, "folder": null, "min_score": null }'Search the notes by their words and, when semantic search is on, by their meaning:
{query, results: [{path, table?, score, heading, snippet, matched_by}], meaning}, one result per
note, best first. It always works: with semantic search off it ranks by words alone (BM25:
rare words count more; a word in the note’s name or properties counts more), with it on it fuses
both rankings (Reciprocal Rank Fusion), so a note found only by its words or only by its meaning
is still there. matched_by says which (words, meaning); meaning is on, off or failed
(the embedding provider failed: words only, meaning_error says why). Query syntax as search_docs:
"a phrase" and +word must appear, -word must not (both rankings); words in any language,
case and accents ignored, no stemming. Filters: tables (qualified or short names), folder,
min_score (the meaning ranking’s cosine floor). limit: default 10, max 100. Then read_note /
select_rows for the details.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Owner only, on reads only (an operation that only reads, tokens/me/, extensions/, the change stream): the request runs with this named token’s permissions and read scope, and the token’s last_seen does not change. A named token sending it gets 403; a request that is not a read gets 400.
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Done.
object
One result per note, best first.
object
Qualified table of a row note.
BM25 when ranked by words alone; the Reciprocal Rank Fusion score when fused.
Heading above the match (empty before the first heading).
About 200 characters around the first match, or the best passage by meaning.
The rankings the note is in.
On: words and meaning fused; off: semantic search is off, words only; failed: the embedding provider failed, words only.
Why the meaning ranking failed (with meaning: failed).
Example
{ "results": [ { "matched_by": [ "words" ] } ], "meaning": "on"}Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Missing or wrong bearer token.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}A named token whose read patterns do not cover the table, view or note the request names (such as token cook may not read personal.health.weight). Sets it did not name (listings, bases, search, the graph, the change feed) are filtered instead.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Unexpected error.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}