outlandishideas / wpackagist

WordPress Packagist — manage your plugins with Composer
https://wpackagist.org
MIT License
704 stars 71 forks source link

search isn't finding plugins when no hyphen in string #506

Open nikolastanin opened 1 year ago

nikolastanin commented 1 year ago

When I type in search: "artiss currency converter" I don't get any results back, etc. no plugin is found with that name.

But when I type it with the hyphens in between like this: "artiss-currency-converter" I do get the desired results.

I suggest improving the search functionality so it covers both cases so the search is more wide spread and I can easily find the package I want :) Screenshot 2023-08-01 at 08 41 59 Screenshot 2023-08-01 at 08 42 40

NoelLH commented 1 year ago

Hey @nikolastanin, thanks for the suggestion.

There's a discussion from a while back linked to this, and somebody I think rightly suggested that searching on name would be the way to go – some plugins end up with a totally different name from their hyphenated "slug" – but to do that we'd also need to store the display name if we're not already.

We'd also need to make sure the search works without needing more services as costs are already becoming a factor, but providing we try to do this kind of search only when running on Postgres (instead of locally on sqlite) we should be OK on that front.

Unfortunately I don't think we have the resources to prioritise this right now without some community help, but I'd happily look at a PR to get it working better if somebody would like to start one.