search: issues and merge requests are searched by their text, not their titles !238

merged merged by cmc on 2026-09-04 17:13 UTC · krz/gitbay:issue-search into main

Discussion

cmc

Stacked on !237.

FTS5 over the title and body of both nouns. External-content tables, so prose is not stored twice; triggers mirror insert, update and delete, and the migration backfills what was already there.

issue list --search and mr list --search filter a repository; search reaches bodies now. The web's issue and MR lists get a search box that composes with the state filter.

Two things worth a look in review:

  • A delete must insert the old values under FTS5's 'delete' command or the index keeps terms for prose that no longer exists. TestIssueSearchFollowsEdits covers the edit and the cascade.
  • FTS5's query language is not free text — bare -, *, :, (, NOT and an odd number of quotes are syntax, and a syntax error surfaces as a failed query, not zero results. Every whitespace-separated run becomes a quoted phrase, ANDed, so what someone types cannot error. Tested with c++, AND, foo:, b*, ().

Closes #114

retargeted from test-timeout to main: !237 merged

2026-09-04 17:13 UTC