Skip to content

fix(search): preserve quoted exact matches#1

Open
Rjected wants to merge 1 commit intowevm:mainfrom
Rjected:dan/implement-quoted-search
Open

fix(search): preserve quoted exact matches#1
Rjected wants to merge 1 commit intowevm:mainfrom
Rjected:dan/implement-quoted-search

Conversation

@Rjected
Copy link
Copy Markdown

@Rjected Rjected commented May 5, 2026

Adds explicit parsing for direct search-box input before building the SQLite FTS5 MATCH expression. Unquoted terms keep the existing prefix-search behavior, while quoted terms are sent as exact FTS phrases so searches like "bal" no longer use the broad bal* prefix query that can match identifiers such as balanceOf.

The query builder also wraps the title-scoped expression in parentheses so title prioritization applies to the full search expression, and it returns no results for empty quoted input instead of sending an empty MATCH query to FTS5.

Validation:

  • npx tsx --test src/lib/SearchQuery.test.ts
  • npx pnpm@10.33.0 check:types
  • npx pnpm@10.33.0 check

Note: a full npx pnpm@10.33.0 test run currently fails during Vite startup because the Cloudflare Vite plugin rejects the configured resolve.external values before tests execute.

@Rjected Rjected marked this pull request as ready for review May 5, 2026 15:40
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.

1 participant