$ann retriever runs a semantic search. It finds the documents whose HYBRID field is closest in
meaning to the query text, even when they use different words.
$ann works only on HYBRID fields.
Parameters
Results
Results are ordered by similarity. Scores are between0 and 1, and a higher score means a closer
match.
$ann has no score threshold. It returns up to LIMIT documents, even when they are not similar to
the query.
The search is approximate. profile trades speed for accuracy, the same way as PROFILE in
VECTOR.QUERY. Paging with OFFSET is also approximate, so two
pages of the same query can overlap or miss a document.
Filtering
Usefilter to search within a subset of documents. The filter is a regular query object, so all
query operators work in it. The filter
selects the documents, but it does not change their scores.
Indexing
Search updates the embeddings before the full-text index. Right after a write,$ann can return a
document that full-text queries do not find yet.
SEARCH.WAITINDEXING waits for both.
Examples
- Redis CLI
SEARCH.QUERY options that $ann does not
support.