Skip to content

Fall back to FTS5/LIKE keyword search when Chroma is disabled#2055

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-queries-fallback-fts5
Closed

Fall back to FTS5/LIKE keyword search when Chroma is disabled#2055
Copilot wants to merge 2 commits intomainfrom
copilot/fix-queries-fallback-fts5

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

When CLAUDE_MEM_CHROMA_ENABLED=false, search requests with a query parameter fail with a misleading error about installing uv, rather than using the already-available FTS5 infrastructure for keyword matching.

Changes

  • SessionSearch: Add FTS5 keyword search path (with LIKE fallback when FTS5 unavailable) to searchObservations, searchSessions, searchUserPrompts. Add hasFtsTables() (cached) and sanitizeFtsQuery() helpers.
  • SQLiteSearchStrategy: Pass query text through to SessionSearch instead of always passing undefined.
  • SearchOrchestrator: PATH 3 (query + no Chroma) now delegates to SQLite strategy with query instead of returning empty results.
  • SearchManager: Legacy path uses FTS5/LIKE fallback instead of setting chromaFailed=true.

Search resolution order when Chroma is unavailable

query provided + Chroma disabled
  → FTS5 MATCH (if observations_fts/session_summaries_fts exist)
    → LIKE fallback (if FTS5 query fails or tables missing)

User prompts use LIKE directly (no FTS5 table exists for user_prompts).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9b1085d9-2e87-4035-828b-2c39615c4936

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch copilot/fix-queries-fallback-fts5

Comment @coderabbitai help to get the list of available commands and usage tips.

When CLAUDE_MEM_CHROMA_ENABLED is false and a text query is provided,
search now gracefully falls back to SQLite FTS5 keyword matching
(or LIKE-based search if FTS5 is unavailable) instead of returning
a misleading error about uv/Python installation.

Changes:
- SessionSearch: Add FTS5 and LIKE text search paths for observations,
  sessions, and user prompts
- SQLiteSearchStrategy: Pass query text through to SessionSearch
- SearchOrchestrator: PATH 3 (no Chroma) falls back to SQLite keyword search
- SearchManager: Legacy path uses FTS5/LIKE fallback instead of error

Fixes #1960

Agent-Logs-Url: https://github.com/thedotmack/claude-mem/sessions/a83837bc-0b36-40fe-90e5-6f5806925e16

Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix text queries fallback to FTS5 when Chroma is disabled Fall back to FTS5/LIKE keyword search when Chroma is disabled Apr 17, 2026
Copilot AI requested a review from thedotmack April 17, 2026 20:37
@thedotmack thedotmack closed this Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text queries should fall back to FTS5 when Chroma is disabled

2 participants