chroma-core/chroma · error · NotImplementedError

Search is not implemented for Local Chroma

Error message

Search is not implemented for Local Chroma

What it means

RustBindingsAPI._search (chromadb/api/rust.py:393) is a stub that raises NotImplementedError. The multi-query Search API (Collection.search(searches=[...])) is implemented server-side only; the embedded Rust bindings expose just the classic query/get paths, so _search always fails in this mode.

Source

Thrown at chromadb/api/rust.py:393

    @override
    def _get_indexing_status(
        self,
        collection_id: UUID,
        tenant: str = DEFAULT_TENANT,
        database: str = DEFAULT_DATABASE,
    ) -> "IndexingStatus":
        raise NotImplementedError("Indexing status is not implemented for Local Chroma")

    @override
    def _search(
        self,
        collection_id: UUID,
        searches: List[Search],
        tenant: str = DEFAULT_TENANT,
        database: str = DEFAULT_DATABASE,
        read_level: ReadLevel = ReadLevel.INDEX_AND_WAL,
    ) -> SearchResult:
        raise NotImplementedError("Search is not implemented for Local Chroma")

    @override
    def _count(
        self,
        collection_id: UUID,
        tenant: str = DEFAULT_TENANT,
        database: str = DEFAULT_DATABASE,
        read_level: ReadLevel = ReadLevel.INDEX_AND_WAL,
    ) -> int:
        return self.bindings.count(str(collection_id), tenant, database)

    @override
    def _peek(
        self,
        collection_id: UUID,
        n: int = 10,
        tenant: str = DEFAULT_TENANT,
        database: str = DEFAULT_DATABASE,

View on GitHub (pinned to aecdd12c8a)

Solutions

  1. Run the workload against a Chroma server via chromadb.HttpClient, which implements the search endpoint
  2. Replace batched search with individual collection.query(...) calls, which the Rust bindings do support
  3. Gate the .search() code path on the client backend (server vs embedded) at startup

Example fix

# before (raises NotImplementedError on Rust bindings)
results = collection.search([Search(query=['gravity'], n_results=5)])

# after - use query(), supported everywhere
results = collection.query(query_texts=['gravity'], n_results=5)
Defensive patterns

Strategy: fallback

Validate before calling

def supports_search(client) -> bool:
    """Multi-query .search() is server-only."""
    return type(client._server).__module__.startswith('chromadb.api.fastapi')

Try / catch

try:
    results = collection.search(searches)
except NotImplementedError:
    # embedded: fall back to per-query collection.query()
    results = [collection.query(query_texts=s.query, n_results=s.n_results) for s in searches]

Prevention

When it happens

Trigger: client = chromadb.RustClient(...); client.get_collection('docs').search([Search(query=['a'], n_results=10), ...]). Any Collection.search() (multi-search batch) call routed to the Rust bindings backend.

Common situations: Migrating a server-based workload (which used batched search) to the embedded Rust client for local testing; feature-flag experiments enabled in environments where the backend does not support them.

Related errors


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/a7ab53b16cc4ecab. Report an issue: GitHub.