Jump to content

Unknown column 'Relevance' in 'order clause


keat

Recommended Posts

I intially though fix (#1508) fixed this, but it still happens.

If I search for an item with a small product_code, it fails. (no products found)

A second subsequent search for the same product yields results

 

[11] SHOW COLUMNS FROM CubeCart_search; -- (0.000845909118652 sec) [CACHE WRITE]
[12] SELECT SQL_CALC_FOUND_ROWS `id`, `hits` FROM `CubeCart_search` WHERE CubeCart_search.searchstr = 'TR4' LIMIT 1; -- (0.00126695632935 sec) [NOT CACHED]
[13] SELECT FOUND_ROWS() as Count; -- (0.000113964080811 sec) [NOT CACHED]
[14] UPDATE `CubeCart_search` SET `hits` = '197' WHERE CubeCart_search.id = '229'; -- (0.000271081924438 sec) [NOT CACHED]
[15] SHOW INDEX FROM `CubeCart_inventory`; -- (0.000421047210693 sec) [CACHE WRITE]
[16] SHOW VARIABLES LIKE 'ft_min_word_len' -- (0.00037693977356 sec) [CACHE WRITE]
[17] SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (I.name RLIKE '[[::]]' OR I.description RLIKE '[[::]]' OR I.product_code RLIKE '[[::]]') ORDER BY Relevance DESC LIMIT 12 OFFSET 0 -- (0.000531196594238 sec) [CACHE WRITE]
[18] SELECT I.* FROM CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM CubeCart_pricing_group WHERE group_id = 0 GROUP BY product_id) as G ON G.product_id = I.product_id WHERE I.product_id IN (SELECT product_id FROM `CubeCart_category_index` as CI INNER JOIN CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 AND (I.name RLIKE '[[::]]' OR I.description RLIKE '[[::]]' OR I.product_code RLIKE '[[::]]') -- (0.0384960174561 sec) [CACHE WRITE]

 

[1] 1: Unknown column 'Relevance' in 'order clause' [ERROR - CACHE WRITE]

 

 

What I did notice, is that (#1508) when it yielded results, yielded more results.

ie searching TR1 also gave TR10, TR11, TR12 etc etc

 

I've gone back to changing $query = $q2.' '.$order_string.' '.$limit;  to $query = $q2.'  '.$limit;  for the time being.

 

 

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...