- Posts: 303
- Thank you received: 18
Smart Search Index Issues when using Smart Search - HikaShop Products
- mojooutdoors-holden
-
Topic Author
- Offline
-- Joomla version -- : 4.3.0
-- PHP version -- : 8.1
When I run the indexer with "Smart Search - HikaShop Products" turned on, I receive a JSON error that stops the indexing. Some products are indexed, but not all (all other joomla content isn't indexed either since it is indexed AFTER hikashop content):
If I disable this plugin and run the indexer, no errors and all other Joomla content is indexed properly:
From the JSON parse error, it would seem like something isn't being sanitized properly. I have tried changing the columns that should be indexed and toggling the index by category or not. No luck.
Let me know if you need any additional information or backend access.
Please Log in or Create an account to join the conversation.
What you're describing indeed seems to mean that you've selected some columns containing invalid text.
The error is not complete. Could you please look in the PHP error log of your hosting for the error message ? You should find the rest of the error, which should point at the file and line number where the problem is happening. That should help us move forward. Also, we'll probably need a backend and a FTP access in order to investigate.
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
- Posts: 303
- Thank you received: 18
I patched that plugin by checking for nulls, and the errors are gone and indexing is running to completion.
I have 2 somewhat related questions:
1. is it normal for products with no titles to be indexed? I'm not even clear where these are coming from as the links they point to are dead.
2. are categories indexed with this smart search plugin?
Please Log in or Create an account to join the conversation.
1. The plugin doesn't check that the name of the product is filled when the indexing requests the list of products to be indexed. So it's totally possible that products without names are indexed.
Could you provide the link of one of these products ? It should contain the product_id or the product_alias in the URL. From there, it should be possible to search for it in the backend products listing.
2. Categories are not indexed.
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
- Posts: 303
- Thank you received: 18
However, after spot checking some of the links, some of them point to the raw product page (no parent category). For the others that don't exist, I checked through some really old backups, and these correspond to products that no longer exist (deleted from the backend). I guess it might be possible if there's some issue with the DB still retaining these old, deleted products?
Please Log in or Create an account to join the conversation.
Indeed. Products indexed and deleted before installing HikaShop HikaShop 4.4.1 or newer would be left in the index.
Before that, products being deleted wouldn't trigger the smart search system.
So you can just delete these old entries.
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
- Posts: 303
- Thank you received: 18
It seems like they might be rogue products that were deleted but still show in the products DB table.
Please Log in or Create an account to join the conversation.
If the products are deleted, they can't be indexed.
If they are reindexed, it means they are still there and not deleted.
Please provide a backend access and we can look at the situation.
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
- Posts: 303
- Thank you received: 18
I guess I will either add names to these variants or just delete those index entries.
Please Log in or Create an account to join the conversation.
Ok. That makes sense.
On our end, I've made a patch in HikaShop to properly fill the name parameter in the URL even when indexing variants.
That way, it should mean it can still index variants (if you set different descriptions for each for example), while generating a valid link.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The fix is already in HikaShop. So if you have an old version of HikaShop, update it.
Then, click on the "index" button of the Smart Search component in the backend to reindex everything and it should be good.
Please Log in or Create an account to join the conversation.
Thank you for your updated, well.. currently my website has Chinese & Japanese version, so that why I have updated my Hikashop to be paid version to have smart search services indexing my all-product category, Thanks again & lets looks forward the next updated in September.
regards,
Fien
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
- Posts: 303
- Thank you received: 18
Odd behavior I found:
- If I unpublish all of the pkg_search plugins and package (i.e., smart search only), i don't see the hikashop content indexed.
- If I unpublish the search plugin for hikashop categories, i don't see the category entries in smart search.
- links displayed in search results are no longer canonical links and are instead basic product links with no category attached.
Please Log in or Create an account to join the conversation.
1. and 2. The plugins of the group "search" are not related to the smart search. Disabling them won't change anything for the indexing of the smart search. Please double check.
Note that categories are not indexed by the smart search. Only the products are indexed.
And the smart search system won't take into account the search results of the plugins of the group "search".
It will only take into account the data indexed thanks to the plugins of the group "finder".
3. That's indeed the case. Due to how the smart search works, the link to the product page needs to be provided by the finder plugin during the indexing in a non SEFed format. So we cannot provide the canonical URL at that point. I didn't find a way to change this.
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
- Posts: 303
- Thank you received: 18
Since the product_canonical can be set as an index in the hikashop smart search plugin, perhaps finder just needs an override to disolay this custom field if available instead of non-SEF url?
Also, I will try disabling the search type plugins again to see if hikashop is indexed properly.
Please Log in or Create an account to join the conversation.
With a view override of the search results page of the smart search component, you could indeed have it use the canonical URL when available. It would require running a MySQL query to load up the data from the database.
Now, that's not something we can implement as a clean solution on our end. View overrides are supposed to be either:
- provided by the template
- made by the end user for his specific needs
Components are not supposed to create view overrides for other components.
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
- Posts: 303
- Thank you received: 18
Last question. I understand categories themselves are not indexed, but there's a setting in the finder plugin for hikashop called "index products by category". I would think this would yield non-SEF product links with the category id appended to the URL. However, with that option enabled, i still only see the product SEF without category specified. Am i misunderstanding what that setting means?
Please Log in or Create an account to join the conversation.
This option will allow you to display a filter dropdown on the categories in the smart search page on the frontend.
It has nothing to do with the URL of the search results.
Please Log in or Create an account to join the conversation.