Skip to content

fix(search): multi-word marketplace search (#3) - #5

Open
xre217 wants to merge 1 commit into
dogeorg:mainfrom
xre217:fix/search-multiword
Open

fix(search): multi-word marketplace search (#3)#5
xre217 wants to merge 1 commit into
dogeorg:mainfrom
xre217:fix/search-multiword

Conversation

@xre217

@xre217 xre217 commented Jul 11, 2026

Copy link
Copy Markdown

#3 — Search UX only matched one contiguous phrase

`ajax-fetch.php` used `title LIKE '%full query%'`, so multi-word queries like `book puppet` failed even when both terms appeared in the catalog.

Fix

  • Split on whitespace / commas (max 8 tokens)
  • AND across tokens; each token may match title OR description
  • Prepared statements + LIKE wildcard escaping
  • Empty-state message for zero hits
  • Cap 48 results; tax lookup no longer fatals if `tax` table missing

Pairs with #4 (tax table schema).

DOGE

Tips/contract: `DTRJECKXfxgnSzGbt7TYRikLPDocqvdmo5` · trefongwork@gmail.com

Navbar search was a single LIKE on title, so "book puppet" returned
nothing even when both words existed. Split tokens on spaces/commas,
require every token in title OR description, prepared statements,
empty-state message, and safe tax lookup.

Tips DOGE: DTRJECKXfxgnSzGbt7TYRikLPDocqvdmo5
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