test
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • ekhymosis06 Friend
    #198513

    Hi all.

    Today I made the upgrade to 1.1.3. But now the search engine does not detect the “keywords” of the items. :((

    For example:
    This item (http://www.icomercial.co/ferreteria/m-v-representaciones.html) has the keywords: “ferreteria” “construccion”. Previously appeared in search results… but now (after the upgrade) not appear.

    Please help, today I present this service to many customers.

    Thanh Nguyen Viet Friend
    #537951

    If you search with the keyword inmetadata:ferreteria or “ferreteria” (enclosed with quotes, for exact phrase search), it still returns the item.

    But it returns no result with keyword ferreteria.

    Please remove all custom code that I suggested in previous thread, since in this new version, we have updated keyword search function that allows you to search with many different search modes.

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

    ekhymosis06 Friend
    #538135

    Hi.

    Ok, I will send you the ftp account.

    Suggestion: These new features should be optional in the module configuration…

    Thanh Nguyen Viet Friend
    #538258

    I have just checked your site.
    This issue occured because you added the code to detect tag from keyword that mentioned here:

    http://www.joomlart.com/forums/topic/detect-tags-in-the-search/

    And when you search with the keyword ferreteria, it will check in tag list and find this item, then it will search items with this tag. However, there is no item with this tag so the result returns null.

    To resolve this issue, I have updated code to detect tag as follows:

    [PHP]$tags_id = JRequest::getVar(‘tags_id’);
    if(!$tags_id) {
    $badchars = array(‘#’, ‘>’, ‘<‘, ‘\’);
    $search = JString::trim(JString::str_ireplace($badchars, ”, JRequest::getString(‘searchword’, null)));
    if(!empty($search) && strpos($search, ‘tag:’) === 0) {
    $search = str_replace(‘tag:’, ”, $search);
    $sqlTag = “SELECT id FROM #__k2_tags WHERE `name` = “.$db->quote($search);
    $db->setQuery($sqlTag);
    $tagid = $db->loadResult();
    if($tagid) {
    //convert keyword to tag
    $tags_id = array($tagid);
    JRequest::setVar(‘tags_id’, $tags_id);
    JRequest::setVar(‘searchword’, ”);
    }
    }
    }[/PHP]

    You need to add prefix “tag:” before your keyword if you want to search by tag now.

    <blockquote>Suggestion: These new features should be optional in the module configuration…</blockquote>

    We will release a new version for quick update on this feature, you can check this issue status here
    http://pm.joomlart.com/browse/JAK2FILTER-165

    ekhymosis06 Friend
    #538351

    Thanks… this upgrade is very usefull, but is there any way to not have to use quotes to search tags?
    for my public/users/visitors is complicated searches using terms such as: “inmetadata”, “tags” or other terms…

    Thanh Nguyen Viet Friend
    #538406

    As any advanced feature, it requires to define its own rules to handle many different cases, and of course it requires user to spend a bit time to learn it. I think that is not hard to learn, since these rules are similar to the way Google support.

    As suggested in my previous post, you need add a tip icon next to keyword search filed (upon mouse hover, the tooltip will show how to search with advanced mode), so it can help your user to search easily.

    ekhymosis06 Friend
    #538528

    Hi Dead Code..

    Is very (very much) important for me if can search in tags (without quotes or advanced terms, obviously)…. for other sites maybe not, but for my site it is important

    Help me, please… sorry, again, for my insistence…

    PS: Is not possible add “tags” in the list? 😉


    1. jeditor_file_providerimgIdckupload201406097310812527737542427fileNamekeyword_search_in
    Thanh Nguyen Viet Friend
    #538545

    <blockquote>search in tags (without quotes or advanced terms, obviously)</blockquote>
    To search by tags without prefix “tag:”, please try to update mentioned code as follows:

    [PHP]$tags_id = JRequest::getVar(‘tags_id’);

    if(!$tags_id) {
    $badchars = array(‘#’, ‘>’, ‘<‘, ‘\’);
    $search = JString::trim(JString::str_ireplace($badchars, ”, JRequest::getString(‘searchword’, null)));
    if(!empty($search)) {
    $sqlTag = ”
    SELECT t.id FROM #__k2_tags AS t
    INNER JOIN #__k2_tags_xref AS r ON r.tagID = t.id
    WHERE t.`name` = “.$db->quote($search);
    $db->setQuery($sqlTag);
    $tagid = $db->loadResult();
    if($tagid) {
    //convert keyword to tag
    $tags_id = array($tagid);
    JRequest::setVar(‘tags_id’, $tags_id);
    JRequest::setVar(‘searchword’, ”);
    }
    }
    }[/PHP]

    <blockquote>PS: Is not possible add “tags” in the list? </blockquote>
    No, we will not apply this feature since JA K2 filter has separated field for search by tag now.

    ekhymosis06 Friend
    #538659

    Thanks, Dead Code.
    Now my site works perfect…
    Your support was excellent.

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

This topic contains 9 replies, has 2 voices, and was last updated by  ekhymosis06 10 years, 6 months ago.

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