Skip to content

The sections of the docs of this version closest in meaning to a query: what `search_docs` fuses with its ranking by words (hybrid search).

POST
/datanotes/manual/search/
curl --request POST \
--url https://example.com/datanotes/manual/search/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "query": "example", "limit": 50 }'

The engine embeds every section of the docs it ships with the provider of semantic search, in an index of its own (semantic/docs.json in its store), rebuilt when the docs change. It builds the index in the background, after it starts and when a search finds it out of date: until the index covers the docs, the answer has ready: false and no results. 400 when semantic search is off.

Media typeapplication/json
object
query
required

The words to rank the sections by, such as time travel a view.

string
limit

The most sections to return.

integer
default: 50 >= 1 <= 100

Done.

Media typeapplication/json
object
query
required
string
version
required

The version of the docs the engine ships: a hash of their sections. search_docs fuses the results only when its own docs have the same.

string
ready
required

The index covers every section of that version; false while the engine builds it, with no results.

boolean
sections
required

The sections of the docs.

integer
embedded
required

The sections that have their vector.

integer
results
required

The sections closest in meaning first.

Array<object>
object
path
required

The section, as read_docs reads it: guides/history/restore#time-travel-and-restore-the-whole-database.

string
score
required

Cosine similarity, -1 to 1.

number
last_error

Why the last build of the index failed, while it is not ready.

string

Example generated

{
"query": "example",
"version": "example",
"ready": true,
"sections": 1,
"embedded": 1,
"results": [
{
"path": "example",
"score": 1
}
],
"last_error": "example"
}

Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Missing or wrong bearer token.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Unexpected error.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

The docs are not in this installation (a checkout where they were not built).

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}