Skip to content

API Reference parrot_tools.multistoresearch.origins.lancedb

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.multistoresearch.origins.lancedb

View source

LanceDB search origin: vector or native hybrid, plus an explicit FTS route.

Borrows an already-configured LanceDBStore. Never opens or closes it — the caller owns connection lifetime (spec §2). This module imports only parrot.models/.base — never lancedb or parrot.stores.lancedb — so importing it (and the whole origins package) never requires the optional SDK extra.

Class LanceDBOrigin

Federates LanceDB vector or native hybrid results into the toolkit.

Parameter Type Default Description
store Any An already-configured LanceDBStore (or any object exposing the same async similarity_search/fulltext_search/ hybrid_search surface). Borrowed — this origin never opens, closes, or disconnects it.
name str 'lancedb' Adapter name, defaults to "lancedb".
description str '' LLM-readable explanation of this origin.
mode Literal['vector', 'hybrid'] 'hybrid' "vector" or "hybrid" — which method :meth:search dispatches to. :meth:fts_search always calls lexical search regardless of this setting.
collection str | None None Fixed collection/table scope for every call.
metadata_filters dict[str, Any] | None None Fixed metadata filter scope for every call.
include_parents bool False Fixed parent-visibility scope for every call.
timeout float | None None Optional per-adapter timeout override in seconds.

Method LanceDBOrigin.search

Run the configured mode (vector or hybrid) with limit=k.

Errors and cancellation propagate unchanged — the toolkit isolates per-origin failures itself; this adapter never returns an empty success on backend failure (spec §8 whole-origin-failure answer).

search(query: str, k: int) -> list[OriginHit]

Parameter Type Default Description
query str
k int

Returns: list[OriginHit]

Method LanceDBOrigin.fts_search

Always route to lexical search, regardless of the configured mode.

fts_search(query: str, k: int) -> list[OriginHit]

Parameter Type Default Description
query str
k int

Returns: list[OriginHit]

Alias SearchOrigin

Re-exported from parrot_tools.multistoresearch.origins.base.SearchOrigin.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally