Skip to content

fix(search): bind values in relevance expressions - #40

Merged
Seiger merged 1 commit into
Seiger:1.xfrom
MiddleSokilAI:sokil/bind-search-values-20261123
Nov 23, 2026
Merged

Seiger merged 1 commit into
Seiger:1.xfrom
MiddleSokilAI:sokil/bind-search-values-20261123

Conversation

@MiddleSokilAI

Copy link
Copy Markdown
Contributor

Search relevance expressions currently interpolate search phrases and words into SQL. A term such as O'Brien can break the query, and crafted input can change the generated expression.

Bind every LIKE pattern used by product, review, and attribute relevance scoring. Attribute column names now use the active query grammar. Product matching modes, exact-phrase and word weights, filtering, and pagination retain their existing behavior.

Validation:

  • 81 runtime assertions using the real models, prefixed tables, and in-memory SQLite on PHP 8.4.
  • Covers apostrophes, email-style terms, wildcard characters, injection-shaped input, ranking, product matching modes, and pagination.
  • PHP lint and git diff --check passed.

The regression script is picked up by the existing PHP 8.4/8.5 CI matrix.

@Seiger
Seiger merged commit b2f8761 into Seiger:1.x Nov 23, 2026
2 checks passed
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