[Skip to main content](#vessel-content)

#   Smart Search integration - incompatible "Optimize Index"

##

- **[Giuse](/forum/user/59190-giuse "View Giuse's Profile")**
- [![Giuse's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59190-giuse "View Giuse's Profile") Topic Author
- [ Offline](/forum/user/59190-giuse)

Less More

- Posts: 86
- Thank you received: 5
-
-

3 years 5 months ago [\#352597](#352597) by [Giuse](/forum/user/59190-giuse "View Giuse's Profile")  *[Smart Search integration - incompatible "Optimize Index"](/forum/30-integrations/906580-smart-search-integration-incompatible-optimize-index#352597 "-- 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 &quot;Optimize&quot; 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 #&#95;&#95;hikashop&#95;product table, just a 'product&#95;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")* was created by *[Giuse](/forum/user/59190-giuse "View Giuse's Profile")*

-- 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 Code:

Unknown column 'id' in 'field list'

After some debugging, this is because there is this query
Code:

SELECT CONCAT('index.php?option=com_hikashop&amp;ctrl=product&amp;task=show&amp;cid=&amp;name=&amp;Itemid=&lt;menu_id&gt;', id) FROM &#96;#__hikashop_product&#96;)

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy85MDY1ODAtc21hcnQtc2VhcmNoLWludGVncmF0aW9uLWluY29tcGF0aWJsZS1vcHRpbWl6ZS1pbmRleD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

3 years 5 months ago [\#352600](#352600) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Smart Search integration - incompatible "Optimize Index"](/forum/30-integrations/906580-smart-search-integration-incompatible-optimize-index#352600 "-- 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 &quot;Optimize&quot; 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 #&#95;&#95;hikashop&#95;product table, just a 'product&#95;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")*

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.

The following user(s) said Thank You: [Giuse](/forum/user/59190-giuse "View Giuse's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy85MDY1ODAtc21hcnQtc2VhcmNoLWludGVncmF0aW9uLWluY29tcGF0aWJsZS1vcHRpbWl6ZS1pbmRleD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.041 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
