Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 797 forks source link

Jetpack Search prevents partial text matches for WC Products #38938

Open maxlaf opened 1 month ago

maxlaf commented 1 month ago

Impacted plugin

Search

Quick summary

When Jetpack Search is enabled, the "Product Search" block does not search for partial text matches.

Steps to reproduce

Searching seems to be heavily cached and I recommend using a new private window for each search test.

  1. Create a new WooCommerce store and import some products.
  2. Access the Site Editor and add a "Product Search" block to the navigation, if it isn't there already.
  3. In a private window, open the site and do a partial search for a product title. I used sample Woo products, tested with the "Beanie" product, and searched for "bean". You should see products returned.
  4. Close all private windows to clear any caches and install JP/enable JP search.
  5. Open a new private window and search for the same term in step 3. It should return no results.
  6. In the same window, search for a full word in the product title from step 3 (eg "beanie"). It should return results.

A clear and concise description of what you expected to happen.

Jetpack Search to support partial text match for products.

What actually happened

Jetpack Search effectively prevents users from finding products unless they know the product title and search for a specific word in it.

Impact

All

Available workarounds?

Yes, easy to implement

If the above answer is "Yes...", outline the workaround.

Toggle JP search off.

Platform (Simple and/or Atomic)

Atomic, Self-hosted

Logs or notes

No response

gibrown commented 1 week ago

Also discussed a bit in https://github.com/Automattic/jetpack/issues/8895

Always supporting partial matches tends to reduce the precision of search, but especially partial product names or numbers is often useful.