test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • balithisweek Friend
    #194991

    I just installed JA K2 Search, it working good and showing the correct search result by the keyword, category etc
    BUT the problem is my item is showing 3 times in the search result,

    example : i have a k2 item “Sample” i search with keyword “Sam” it showing on the result but with 2 duplicate so there are 3 same item in the result

    Thanh Nguyen Viet Friend
    #523597

    @balithisweek

    To resolve this issue, please open the file
    components/com_jak2filter/models/itemlist.php

    Replace the following code snippet

    $query = "SELECT i.*, CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name as categoryname,c.id as categoryid, c.alias as categoryalias, c.params as categoryparams";

    With:

    $query = "SELECT DISTINCT i.*, CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name as categoryname,c.id as categoryid, c.alias as categoryalias, c.params as categoryparams";

    balithisweek Friend
    #523668

    Hi, Thanks for your answer,

    i already have that script in the website but it still showing the same problem

    balithisweek Friend
    #523670

    <em>@Dead Code 412418 wrote:</em><blockquote>@balithisweek

    To resolve this issue, please open the file
    components/com_jak2filter/models/itemlist.php

    Replace the following code snippet

    $query = "SELECT i.*, CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name as categoryname,c.id as categoryid, c.alias as categoryalias, c.params as categoryparams";

    With:

    $query = "SELECT DISTINCT i.*, CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name as categoryname,c.id as categoryid, c.alias as categoryalias, c.params as categoryparams";
    </blockquote>
    Hi, Thanks for your answer,

    i already have that script in the website but it still showing the same problem

    Thanh Nguyen Viet Friend
    #523677

    <em>@balithisweek 412525 wrote:</em><blockquote>Hi, Thanks for your answer,

    i already have that script in the website but it still showing the same problem</blockquote>

    My apology, you need to update a little bit more to resolve this issue.

    Open the file that mentioned above, find the following code line:

    [PHP]$query = “SELECT COUNT(*) FROM #__k2_items as i RIGHT JOIN #__k2_categories c ON c.id = i.catid”;[/PHP]

    and replace it with:

    [PHP]$query = “SELECT COUNT(DISTINCT i.id) FROM #__k2_items as i RIGHT JOIN #__k2_categories c ON c.id = i.catid”;[/PHP]

    If it does not help, please PM me FTP credentials of your site, I’ll help you out.

    quangtuan0302 Friend
    #535022

    <em>@Dead Code 412532 wrote:</em><blockquote>My apology, you need to update a little bit more to resolve this issue.

    Open the file that mentioned above, find the following code line:

    [PHP]$query = “SELECT COUNT(*) FROM #__k2_items as i RIGHT JOIN #__k2_categories c ON c.id = i.catid”;[/PHP]

    and replace it with:

    [PHP]$query = “SELECT COUNT(DISTINCT i.id) FROM #__k2_items as i RIGHT JOIN #__k2_categories c ON c.id = i.catid”;[/PHP]

    If it does not help, please PM me FTP credentials of your site, I’ll help you out.</blockquote>

    i use source 05/14/2014 but not fix..please help me…
    http://www.joomlart.com/forums/topic/duplicate-search-result-ja-k2-search/

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 3 voices, and was last updated by  quangtuan0302 10 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum