Skip to content

[P2][bug] Semantic search ignores --database and returns the active DB's results #1676

Closed

Description

@mstomar125

Summary

nodespace search "<q>" --database <other-db> ignores --database and returns results from the active DB. Structured query honors --database; semantic search does not. Confirmed in validation round-1 (2026-07-16): search "T4 Owner" --database b2test (an empty/other DB) returned the same 14 hits as the un-flagged search against the active DB.

Likely cause

Semantic search resolves the embedding index / query against the daemon's active DB handle; the --database selection isn't threaded into the search path the way it is for structured query.

Fix direction

Thread --database into the semantic-search path (mirror structured query); error clearly on an unknown/missing DB rather than silently falling back to the active one.

Evidence

Validation report val-B2-FAIL.md (round-1 pack, 2026-07-16). Note: a full two-populated-DB A/B was blocked by the new-DB-creation bug (separate issue) — fix that first for clean verification.

Activity

  1. self-assigned this
    on Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions