SearchWP Incomplete search results when looking for product numbers

12 hours ago 1
ARTICLE AD BOX

A webshop I've been tasked with supporting uses SearchWP (alongside SearchWP Live Ajax Search) for the search function. It works pretty well for the most part, but there is an issue when dealing with product numbers. It doesn't show all the

For example, there are 29 product listed on the products page in the backend, where the product number starts with 098.214. These are also all available in the frontend and when searched individually (when I enter 098.214.545, the product with that product number gets found).

Wordpress backend showing the amount of products, where the product number starts with "098.214.". 29 entries were found.

When I enter "098.214." inside the search bar, however, I only get 6. Products like 098.214.545 are missing from the results. That one gets found when I enter 098.214.54 though.

 098.214 From 6711 searched products were 6 found"

When I activate the debug log for SearchWP, this is what it puts out when looking for "098.214.":

[2026-03-25 08:19:49] [query] Query for: 098.214. [2026-03-25 08:19:49] [query] Arguments: engine: default (previously instantiated) mods: 2 site: all per_page: -1 page: 1 offset: 0 fields: ids [2026-03-25 08:19:49] [query] Engine: default [2026-03-25 08:19:49] [query] Tokens: 098.214, 098.214.051, 098.214.052, 098.214.053, 098.214.055, 098.214.055.jpg, 098.214.056, 098.214.056.jpg, 098.214.130, 098.214.140 [2026-03-25 08:19:49] [query] Mods: 4 [2026-03-25 08:19:49] [query] Trying AND logic [2026-03-25 08:19:49] [query] Found results using: and logic [2026-03-25 08:19:49] [query] Request: SELECT s.id,s.source,s.site,SUM(relevance) AS relevance,IF(SUM(searchwp_exacts), 1, 0) AS searchwp_exacts FROM (SELECT s.id,s.source,s.site,s.attribute,((SUM(s.occurrences) * CASE WHEN ( (s.source = 'post.product' AND (s.attribute IN ('title','slug','author','meta._sku'))) ) THEN 300 WHEN ( (s.source = 'post.product' AND (s.attribute IN ('content','excerpt') OR (s.attribute LIKE 'meta.ProductAssignment%'))) ) THEN 1 END) ) AS relevance,s.token,(CASE WHEN (s.token IN (1712,1482)) THEN 1 ELSE 0 END) AS searchwp_exacts FROM wp_searchwp_index s LEFT JOIN wp_posts s1 ON (s1.ID = s.id) LEFT JOIN wp_posts AS swpwcposts ON swpwcposts.ID = s.id WHERE 1=1 AND 1=1 AND s.token IN (2010,46178,44496,46177,67725,116694,67704,116676,63652,61702) AND (1=1 AND ( s1.ID NOT IN ( SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN (0) ) )) AND ((s.source = 'post.product' AND (s.attribute IN ('title','content','slug','excerpt','author','meta._sku') OR (s.attribute LIKE 'meta.ProductAssignment%')) AND ( ( `s1`.`post_type` = 'product' ) AND ( `s1`.`post_status` IN ( 'publish', 'wc-postfi-redirected', 'wc-postfi-waiting', 'wc-postfi-manual' ) ) ) AND ( ( `s1`.`post_status` IN ( 'publish' ) ) ))) AND s.id IN ('20992', '21562', '22766', '22771', '7607', '8159') GROUP BY s.site,s.source,s.attribute,s.id,s.token) AS s LEFT JOIN wp_posts s1 ON (s1.ID = s.id) LEFT JOIN wp_posts AS swpwcposts ON swpwcposts.ID = s.id WHERE 1=1 AND (SUBSTRING(s.source, 1, 5) != 'post.' OR (SUBSTRING(s.source, 1, 5) = 'post.' AND s.id != '0')) GROUP BY s.site, s.source, s.id HAVING relevance > 0 ORDER BY searchwp_exacts DESC, relevance DESC, s.id DESC [2026-03-25 08:19:49] [query] Results: 6 Pages of results: 1 [2026-03-25 08:19:49] [query] Execution time: 0.17331

I assume it's an issue with the tokens, but I tried increasing it as stated in the documentation and it didn't show any changes.

I've only recently started working with WordPress and WooCommerce, so I apologise if I'm missing something obvious here.

Read Entire Article