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

#   Duplicate Search Results in Finder.

##

- **[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")**
- [![joom&#95;dev's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52662-joom-dev "View joom&#95;dev's Profile") Topic Author
- [ Offline](/forum/user/52662-joom-dev)

Less More

- Posts: 7
- Thank you received: 1
-
-

5 years 9 months ago [\#329546](#329546) by [joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")  *[Duplicate Search Results in Finder.](/forum/45-filters-search/901922-duplicate-search-results-in-finder#329546 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.2  Hello,  It seems like any product that's in multiple categories will be listed multiple times in search results.  I know duplicate results can be disabled via finder in the backend but it seems redundant and time consuming to do it every time you run the index for multiple products.  Is there a fix for this?  Thanks, Chetan")* was created by *[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")*

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.2

Hello,

It seems like any product that's in multiple categories will be listed multiple times in search results.

I know duplicate results can be disabled via finder in the backend but it seems redundant and time consuming to do it every time you run the index for multiple products.

Is there a fix for this?

Thanks,
Chetan

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzkwMTkyMi1kdXBsaWNhdGUtc2VhcmNoLXJlc3VsdHMtaW4tZmluZGVyP3RtcGw9bWFya2Rvd24=) 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: 86576
- Thank you received: 14320
-
-

5 years 9 months ago [\#329570](#329570) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Duplicate Search Results in Finder.](/forum/45-filters-search/901922-duplicate-search-results-in-finder#329570 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.2  Hello,  It seems like any product that's in multiple categories will be listed multiple times in search results.  I know duplicate results can be disabled via finder in the backend but it seems redundant and time consuming to do it every time you run the index for multiple products.  Is there a fix for this?  Thanks, Chetan")*

Hi,

Yes, the products are indexed for each category they are in.
Remove the lines: Code:

-&gt;select('c.category_name AS category, c.category_alias as categoryalias, c.category_published AS cat_state, 1 AS cat_access')

Code:

$case_when_item_alias = ' CASE WHEN a.product_alias != "" THEN a.product_alias ELSE a.product_name END as slug'; $query-&gt;select($case_when_item_alias);

and: Code:

-&gt;join('LEFT', '#__hikashop_product_category AS pc ON a.product_id = pc.product_id') -&gt;join('LEFT', '#__hikashop_category AS c ON pc.category_id = c.category_id')

from the file plugins/finder/hikashop/hikashop.php and it should prevent that.
Let us know how it goes. Ideally, we could have an option in the plugin to activate or deactivate that.

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

- **[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")**
- [![joom&#95;dev's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52662-joom-dev "View joom&#95;dev's Profile") Topic Author
- [ Offline](/forum/user/52662-joom-dev)

Less More

- Posts: 7
- Thank you received: 1
-
-

5 years 9 months ago [\#329613](#329613) by [joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")  Replied by *[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")* on topic *[Duplicate Search Results in Finder.](/forum/45-filters-search/901922-duplicate-search-results-in-finder#329613 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.2  Hello,  It seems like any product that's in multiple categories will be listed multiple times in search results.  I know duplicate results can be disabled via finder in the backend but it seems redundant and time consuming to do it every time you run the index for multiple products.  Is there a fix for this?  Thanks, Chetan")*

Hi Nicolas,

Still seeing the duplicates after commenting this code.

Thanks,
Chetan

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzkwMTkyMi1kdXBsaWNhdGUtc2VhcmNoLXJlc3VsdHMtaW4tZmluZGVyP3RtcGw9bWFya2Rvd24=) 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: 86576
- Thank you received: 14320
-
-

5 years 9 months ago [\#329629](#329629) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Duplicate Search Results in Finder.](/forum/45-filters-search/901922-duplicate-search-results-in-finder#329629 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.2  Hello,  It seems like any product that's in multiple categories will be listed multiple times in search results.  I know duplicate results can be disabled via finder in the backend but it seems redundant and time consuming to do it every time you run the index for multiple products.  Is there a fix for this?  Thanks, Chetan")*

Hi,

Well, this modification won't remove the results already indexed. This modification is to avoid the system from reindexing duplicates when the product are in several categories.
Can you confirm that you cleared the index before reindexing with the modification ?

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

- **[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")**
- [![joom&#95;dev's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52662-joom-dev "View joom&#95;dev's Profile") Topic Author
- [ Offline](/forum/user/52662-joom-dev)

Less More

- Posts: 7
- Thank you received: 1
-
-

5 years 9 months ago [\#329648](#329648) by [joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")  Replied by *[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")* on topic *[Duplicate Search Results in Finder.](/forum/45-filters-search/901922-duplicate-search-results-in-finder#329648 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.2  Hello,  It seems like any product that's in multiple categories will be listed multiple times in search results.  I know duplicate results can be disabled via finder in the backend but it seems redundant and time consuming to do it every time you run the index for multiple products.  Is there a fix for this?  Thanks, Chetan")*

Hi Nicolas,

Silly me, I did not ran the index again, but when I did. I got some errors, So I went ahead and modified the SQL a bit and here is the final function for getlistQuery before that works and display the product only once.
[ gist.github.com/chetanmadaan/30b535d747b027855e21487dd5e121c3](https://gist.github.com/chetanmadaan/30b535d747b027855e21487dd5e121c3)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzkwMTkyMi1kdXBsaWNhdGUtc2VhcmNoLXJlc3VsdHMtaW4tZmluZGVyP3RtcGw9bWFya2Rvd24=) 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: 86576
- Thank you received: 14320
-
-

5 years 9 months ago -  5 years 9 months ago [\#329653](#329653) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Duplicate Search Results in Finder.](/forum/45-filters-search/901922-duplicate-search-results-in-finder#329653 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.2  Hello,  It seems like any product that's in multiple categories will be listed multiple times in search results.  I know duplicate results can be disabled via finder in the backend but it seems redundant and time consuming to do it every time you run the index for multiple products.  Is there a fix for this?  Thanks, Chetan")*

Hi,

I've made the option. Please install the plugin, check that the option is turned off, and it should work liek you need when reindexing the products.

Last edit: 5 years 9 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

- **[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")**
- [![joom&#95;dev's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52662-joom-dev "View joom&#95;dev's Profile") Topic Author
- [ Offline](/forum/user/52662-joom-dev)

Less More

- Posts: 7
- Thank you received: 1
-
-

5 years 9 months ago [\#329728](#329728) by [joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")  Replied by *[joom\_dev](/forum/user/52662-joom-dev "View joom&#95;dev's Profile")* on topic *[Duplicate Search Results in Finder.](/forum/45-filters-search/901922-duplicate-search-results-in-finder#329728 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.24 -- PHP version -- : 7.2  Hello,  It seems like any product that's in multiple categories will be listed multiple times in search results.  I know duplicate results can be disabled via finder in the backend but it seems redundant and time consuming to do it every time you run the index for multiple products.  Is there a fix for this?  Thanks, Chetan")*

That worked nicolas.

Thank you,
Chetan

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzkwMTkyMi1kdXBsaWNhdGUtc2VhcmNoLXJlc3VsdHMtaW4tZmluZGVyP3RtcGw9bWFya2Rvd24=) 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.077 seconds

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