Skip to content

Use FTS for search endpoint#1

Closed
swalkinshaw wants to merge 1 commit intomainfrom
search-use-fts
Closed

Use FTS for search endpoint#1
swalkinshaw wants to merge 1 commit intomainfrom
search-use-fts

Conversation

@swalkinshaw
Copy link
Member

No description provided.

@swalkinshaw swalkinshaw force-pushed the search-use-fts branch 2 times, most recently from 06076d1 to 1cb8f7d Compare March 14, 2026 23:16
@retlehs
Copy link
Member

retlehs commented Mar 14, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea4b6b9e24

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +563 to +564
where += " AND id IN (SELECT rowid FROM packages_fts WHERE packages_fts MATCH ?)"
args = append(args, ftsQuery(f.Search))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip FTS MATCH when search term tokenizes to empty

If search contains only whitespace (for example ?search=%20%20), ftsQuery returns an empty string and this path still executes packages_fts MATCH ? with "", which SQLite rejects (fts5: syntax error near ""). That turns a harmless user input into a 500 for both public and admin package listings; guard on a trimmed/tokenized query before adding the MATCH clause.

Useful? React with 👍 / 👎.

@retlehs retlehs deleted the search-use-fts branch March 17, 2026 03:07
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.

2 participants