-
AuthorPosts
-
ekhymosis06 Friend
ekhymosis06
- Join date:
- March 2014
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 21
- Thanked:
- 1 times in 1 posts
June 5, 2014 at 4:57 pm #198513Hi 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 FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
June 6, 2014 at 2:33 am #537951If 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.
1 user says Thank You to Thanh Nguyen Viet for this useful post
ekhymosis06 Friendekhymosis06
- Join date:
- March 2014
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 21
- Thanked:
- 1 times in 1 posts
June 6, 2014 at 9:31 pm #538135Hi.
Ok, I will send you the ftp account.
Suggestion: These new features should be optional in the module configuration…
Thanh Nguyen Viet FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
June 9, 2014 at 4:02 am #538258I 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-1651 user says Thank You to Thanh Nguyen Viet for this useful post
ekhymosis06 Friendekhymosis06
- Join date:
- March 2014
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 21
- Thanked:
- 1 times in 1 posts
June 9, 2014 at 3:48 pm #538351Thanks… 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 FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
June 10, 2014 at 2:29 am #538406As 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.
1 user says Thank You to Thanh Nguyen Viet for this useful post
ekhymosis06 Friendekhymosis06
- Join date:
- March 2014
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 21
- Thanked:
- 1 times in 1 posts
June 10, 2014 at 10:00 pm #538528Hi 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? 😉
Thanh Nguyen Viet FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
June 11, 2014 at 2:04 am #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.1 user says Thank You to Thanh Nguyen Viet for this useful post
ekhymosis06 Friendekhymosis06
- Join date:
- March 2014
- Posts:
- 42
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 21
- Thanked:
- 1 times in 1 posts
June 11, 2014 at 8:32 pm #538659Thanks, Dead Code.
Now my site works perfect…
Your support was excellent.AuthorPostsViewing 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
Last upgrade no detect keywords.
Viewing 9 posts - 1 through 9 (of 9 total)