- Posts: 86
- Thank you received: 5
Smart Search integration - incompatible "Optimize Index"
3 years 3 months ago #352597
by Giuse
Smart Search integration - incompatible "Optimize Index" was created by Giuse
-- HikaShop version -- : 4.7.3 starter
-- Joomla version -- : 4.3.2
-- PHP version -- : 8.1
-- Error-message(debug-mod must be tuned on) -- : Unknown column 'id' in 'field list'
Hi, after having indexed HikasShop products with Smart Search, if the "Optimize" command is given in Smart Search - Maintenance, that fails with
After some debugging, this is because there is this query
but there is no 'id' column in #__hikashop_product table, just a 'product_id'.
Disabling smart search hikashop plugin, of course the problem disappears since hikashop products are not indexed anymore.
I don't know if it's a Joomla bug or a Hikashop one.
Thanks
Giuse
-- Joomla version -- : 4.3.2
-- PHP version -- : 8.1
-- Error-message(debug-mod must be tuned on) -- : Unknown column 'id' in 'field list'
Hi, after having indexed HikasShop products with Smart Search, if the "Optimize" command is given in Smart Search - Maintenance, that fails with
Code:
Unknown column 'id' in 'field list'
Code:
SELECT CONCAT('index.php?option=com_hikashop&ctrl=product&task=show&cid=&name=&Itemid=<menu_id>', id)
FROM `#__hikashop_product`)
but there is no 'id' column in #__hikashop_product table, just a 'product_id'.
Disabling smart search hikashop plugin, of course the problem disappears since hikashop products are not indexed anymore.
I don't know if it's a Joomla bug or a Hikashop one.
Thanks
Giuse
Please Log in or Create an account to join the conversation.
3 years 3 months ago #352600
by nicolas
Replied by nicolas on topic Smart Search integration - incompatible "Optimize Index"
Hi,
Well, the bug is kind of shared. Joomla added this optimize function to the Smart Search. But there is no information on it in the developer doc anywhere (or anywhere I could find). Also, the bug happens because Joomla supposes that any table which is indexed uses the column name "id" for the id of the elements indexed, and that's not the case in HikaShop since we're using "product_id" instead.
Fortunately, I was able to find an event which we'll implement in the next version of HikaShop to allow us to override this mechanism for the the smart search plugin in HikaShop.
Finally, note that the optimization system is not that great. What it does is that it deletes the index data for elements that have been deleted. But the smart search plugin we developed already delete the index data when a product is deleted.
Well, the bug is kind of shared. Joomla added this optimize function to the Smart Search. But there is no information on it in the developer doc anywhere (or anywhere I could find). Also, the bug happens because Joomla supposes that any table which is indexed uses the column name "id" for the id of the elements indexed, and that's not the case in HikaShop since we're using "product_id" instead.
Fortunately, I was able to find an event which we'll implement in the next version of HikaShop to allow us to override this mechanism for the the smart search plugin in HikaShop.
Finally, note that the optimization system is not that great. What it does is that it deletes the index data for elements that have been deleted. But the smart search plugin we developed already delete the index data when a product is deleted.
The following user(s) said Thank You: Giuse
Please Log in or Create an account to join the conversation.
Time to create page: 0.081 seconds