Recollect.Search.Vector (recollect v0.5.1)

Copy Markdown View Source

Semantic similarity search over chunks and entries.

Supports multiple database backends via the Recollect.DatabaseAdapter behaviour:

  • PostgreSQL with pgvector
  • SQLite with sqlite-vec
  • libSQL with native vector support

Summary

Functions

Search for similar chunks and/or entries.

Search entities by vector similarity.

Functions

search(query_text, opts \\ [])

Search for similar chunks and/or entries.

Options

  • :owner_id — UUID to scope chunk search
  • :scope_id — UUID to scope entry search
  • :limit — Max results (default: 10)
  • :min_score — Minimum similarity 0.0-1.0 (default: 0.0)
  • :tier:full, :lightweight, or :both (default: :both)
  • :filters — Map of additional filters:
    • :entry_type — Filter by entry type (e.g., :decision, :preference)
    • :tags — Filter by tags (list)
    • :temporal:recent (last 30 days), :archived, or DateTime range
    • :confidence_min — Minimum confidence threshold

search_chunks(query_text, owner_id, opts \\ [])

Search chunks only.

search_entities_vec(query_text, owner_id, opts \\ [])

Search entities by vector similarity.

search_entries(query_text, scope_id, opts \\ [])

Search entries only.