Skip to content

BUG: documents_fts table missing - FTS5 search fails for document chunks in v0.6.4 #549

Closed

Description

@ajianaz

Description

When running uteke recall or uteke doc search on a store that contains documents, a warning is logged indicating the documents_fts table does not exist:

WARN uteke_core::error: database error context="prepare FTS search" err=no such table: documents_fts

This occurs on every recall/search call that attempts FTS5 search as part of the hybrid strategy. Despite the warning, recall still returns results via the vector search fallback — so the feature degrades gracefully but FTS5 for documents is non-functional.

Environment

  • Uteke version: 0.6.4 (upgraded from 0.6.1)
  • OS: Linux 6.8.0-1054-oracle (Oracle Cloud ARM)
  • Store path: ~/.uteke (upgraded in-place, not fresh)
  • Reproducibility: Consistent on every recall/doc search call

Steps to Reproduce

# Any recall or doc search in a namespace with documents
uteke recall --namespace coo "some query" --limit 3
# WARN: database error context="prepare FTS search" err=no such table: documents_fts

uteke doc search --namespace coo "some query"
# WARN: database error context="prepare FTS search" err=no such table: documents_fts
# Results still return (vector search fallback) but with warning on every call

Expected Behavior

The documents_fts FTS5 virtual table should exist and be populated with document chunk content. Schema migration (from v0.6.1 to v0.6.4) should have created this table if it was introduced in a newer version.

Actual Behavior

  • documents_fts table does not exist in the SQLite database
  • FTS5 search path fails silently (warning logged, no error propagated)
  • Hybrid recall still works via vector search fallback
  • Warning appears on every search/recall call (noisy logs)

Possible Root Cause

  1. Schema migration gap: If documents_fts was introduced after v0.6.1, the in-place upgrade to v0.6.4 did not run the necessary migration to create the table
  2. Schema migration not triggered: Schema migrations may only run on uteke init (fresh) but not on existing stores
  3. Table not populated: The table may exist in fresh installs but not be created for stores upgraded from older versions

Suggested Fix

  1. Add a schema migration step that creates documents_fts if missing (run on every startup, not just init)
  2. Populate the FTS5 index from existing document chunks in the database
  3. Consider a uteke migrate command for explicit schema upgrades
  4. Verify that fresh installs (no upgrade path) also have this table

Impact

  • FTS5 search for document content is non-functional for upgraded stores
  • Log noise — warning on every single recall/recall call
  • Hybrid search scores may be inaccurate (missing FTS5 component in RRF fusion)
  • Not a hard blocker — vector search fallback works

Activity

  1. added
    bug
    scope:core
    on Jul 3, 2026
  2. added 2 commits that reference this issue on Jul 3, 2026
  3. added 2 commits that reference this issue on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:mediumscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions