{"record":{"id":"275fd7afdc19d870","repo":"MemPalace/mempalace","slug":"search-error-e","errorCode":null,"errorMessage":"Search error: {e}","messagePattern":"Search error: (.+?)","errorType":"exception","errorClass":"SearchError","httpStatus":null,"severity":"error","filePath":"mempalace/searcher.py","lineNumber":689,"sourceCode":"    try:\n        kwargs = {\n            \"query_texts\": [query],\n            # The window is a post-filter (ChromaDB can't range-compare\n            # string metadata), so widen the fetch the same way the\n            # programmatic path does and trim back after filtering.\n            \"n_results\": _candidate_pool_size(n_results, date_window_active)\n            if date_window_active\n            else n_results,\n            \"include\": [\"documents\", \"metadatas\", \"distances\"],\n        }\n        if where:\n            kwargs[\"where\"] = where\n\n        results = col.query(**kwargs)\n\n    except Exception as e:\n        print(f\"\\n  Search error: {e}\")\n        raise SearchError(f\"Search error: {e}\") from e\n\n    docs = _first_or_empty(results, \"documents\")\n    metas = _first_or_empty(results, \"metadatas\")\n    dists = _first_or_empty(results, \"distances\")\n\n    if date_window_active:\n        kept = [\n            (doc, meta, dist)\n            for doc, meta, dist in zip(docs, metas, dists)\n            if filed_at_in_window((meta or {}).get(\"filed_at\"), since_dt, before_dt)\n        ]\n        # Keep the whole in-window pool here; the hybrid re-rank below must\n        # see every survivor before the display cut to n_results, or a\n        # BM25-strong drawer deep in the pool could never surface.\n        docs = [k[0] for k in kept]\n        metas = [k[1] for k in kept]\n        dists = [k[2] for k in kept]\n","sourceCodeStart":671,"sourceCodeEnd":707,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/searcher.py#L671-L707","documentation":"Error \"Search error: {e}\" thrown in MemPalace/mempalace.","triggerScenarios":"Thrown at mempalace/searcher.py:689 when the library encounters an invalid state.","commonSituations":"Search failed inside the backend or embedding pipeline.","solutions":["Inspect the underlying error; verify the palace is intact and the embedder is reachable"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}