Top Snippets
Get the top K snippets that match the given query.
You may choose between coarse and precise snippets. Precise snippets will average ~200 characters, while coarse snippets will average ~2000 characters. The default is coarse snippets. Use the precise_responses
parameter to adjust.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The name of the collection.
The natural language query to search with. This cannot exceed 4096 characters (A single UTF-8 codepoint, is considered to be 1 character).
The number of snippets to return. If there are not enough snippets matching your filters, then fewer may be returned. This number must be between 1 and 2048, inclusive.
The query filter to apply. Please read Metadata Filtering for more information. If not provided, then all documents will be searched.
Enable precise responses. Precise responses will have higher latency, but provide much more precise snippets. When precise_responses
is set to true
, the responses will average 200 characters. If set to false
, the responses will average 2000 characters. The default is false
.
Response
This is a Snippet.
A snippet refers to a particular document path, and index range. Note that all documents, regardless of filetype, are converted into UTF-8
-encoded strings. The start_index
and end_index
refer to the range of characters. in that string, that have been matched by this snippet.