- Posts: 11
COMMUNITY FORUM
Search K2 Problem
- Pomba
-
Topic Author
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- Kaleb Camacho
-
- Offline
- New Member
- Posts: 3
I want to thank you for a such a powerful extension.
I'm looking into using jxextend's finder with k2 but thought I should mention that I too am having the same issue with the search except the error is on 142 of the k2.php.
When I choose exact phrase it works as well. Take care and thanks again.
-Kaleb
Please Log in or Create an account to join the conversation.
- Pomba
-
Topic Author
- Offline
- New Member
- Posts: 11
Tried everything. Really annoying!! :-)
Please Log in or Create an account to join the conversation.
- Pomba
-
Topic Author
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- d.k.shukla
-
- Offline
- Senior Member
- Posts: 78
I had also got the same error of line 142 and after experimenting I had discovered that search plug in file k2.php of older version v2.1 (September 9th, 2009) is working fine and performing full text search without any error.
I am hoping that developer will look in to it.
Pomba said:Can't figure it out. Any solutions?
Please Log in or Create an account to join the conversation.
- Stephen Robb
-
- Offline
- New Member
- Posts: 4
To me it looks like K2 is creating some invalid SQL.
This works (i.e. returns rows) where search string is found:
SELECT * FROM jos_k2_items as i WHERE MATCH(i.title, i.introtext, i.`fulltext`,i.extra_fields_search,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.metadesc,i.metakey) AGAINST ('"searchstring"' IN BOOLEAN MODE)
This doesn't work (i.e. returns no rows, neither in Joomla or in phpMyAdmin):
SELECT * FROM jos_k2_items as i WHERE
MATCH(i.title, i.introtext, i.`fulltext`,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.extra_fields_search,i.metadesc,i.metakey) AGAINST ('searchsrring')
Please Log in or Create an account to join the conversation.
- d.k.shukla
-
- Offline
- Senior Member
- Posts: 78
I would like to share my other experience about full text search with latest K2 ver 2.2, it is working fine without any error at my local machine. My local system information is following.
PHP Built on: Linux 2.6.32-ARCH #1 SMP PREEMPT Thu Jan 7 22:28:29 CET 2010 x86_64
Database Version: 5.1.42
Database Collation: utf8_general_ci
PHP Version: 5.3.1
Web Server: Apache/2.2.14 (Unix) PHP/5.3.1 with Suhosin-Patch Phusion_Passenger/2.2.2
Web Server to PHP interface: apache2handler
Joomla! Version: Joomla! 1.5.15 Stable [ Wojmamni Ama Mamni ] 05-November-2009 04:00 GMT
User Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100105 Shiretoko/3.5.7
After doing this test it seems that error is coming due to Mysql version but I am not sure.
I hope somebody will fix this error or express their views on this behaviour.
Shukla
Stephen Robb said:I am having the same problem. The issues seems to be with the SELECT statement, and specifically the "MATCH AGAINST" clause. I'm no SQL admin, but I can extract the query K2 is sending using debug mode and edit the query to work using LIKE, but I can't get it to work with the MATCH construct. Note that the exact match option uses "BOOLEAN MODE" in the match, and this seems to work for me too.
To me it looks like K2 is creating some invalid SQL.
This works (i.e. returns rows) where search string is found:
SELECT * FROM jos_k2_items as i WHERE MATCH(i.title, i.introtext, i.`fulltext`,i.extra_fields_search,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.metadesc,i.metakey) AGAINST ('"searchstring"' IN BOOLEAN MODE)
This doesn't work (i.e. returns no rows, neither in Joomla or in phpMyAdmin):
SELECT * FROM jos_k2_items as i WHERE
MATCH(i.title, i.introtext, i.`fulltext`,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.extra_fields_search,i.metadesc,i.metakey) AGAINST ('searchsrring')
Please Log in or Create an account to join the conversation.
- Stephen Robb
-
- Offline
- New Member
- Posts: 4
My database consist of car models and most are identified by a 3-digit model number (e.g. 911, 962, 956 etc). MySQL seems to exclude these criteria from the search, along with the car brand (e.g. 'Porsche'), which occurs in more than 50% of the rows within the table.
This page tells you how to modify the search to include 3-character words...
dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
K2Joom
Pomba said:Removed the error message now, but search still don't give any results.
Tried everything. Really annoying!! :-)
Please Log in or Create an account to join the conversation.
- Donovan Ryan Hay
-
- Offline
- New Member
- Posts: 4
d.k.shukla said:Hi I had also got the same error of line 142 and after experimenting I had discovered that search plug in file k2.php of older version v2.1 (September 9th, 2009) is working fine and performing full text search without any error.
I am hoping that developer will look in to it.
Pomba said:Can't figure it out. Any solutions?
Please Log in or Create an account to join the conversation.
- Pomba
-
Topic Author
- Offline
- New Member
- Posts: 11
d.k.shukla said:Hi I had also got the same error of line 142 and after experimenting I had discovered that search plug in file k2.php of older version v2.1 (September 9th, 2009) is working fine and performing full text search without any error. I am hoping that developer will look in to it.
Pomba said:Can't figure it out. Any solutions?
Please Log in or Create an account to join the conversation.
- Stephen Robb
-
- Offline
- New Member
- Posts: 4
I had this issue at one point and figured that the fields in the FULLTEXT search had to match exactly the fields with this flag set. (i.e. I needed to include all of the fields with FULLTEXT set in the MATCH clause). If you do that, you won't get the above error.
Stephen
Alwin said:I also have the same problem. When I run the query in mysql it is showing
ERROR 1191 (HY000): Can't find FULLTEXT index matching the column list.
and I think that is some problem with the FULLTEXT indexing...Anyone has got a solution..? also please let me know where I get the old file ...?
Please Log in or Create an account to join the conversation.
- Hilary Cheyne
-
- Offline
- New Member
- Posts: 9
Had the line 142 error
added RokAjax Search
extensions.joomla.org/extensions/search-a-indexing/site-search/9011
Then had the line 282 error
So thanks to this thread:
Downloaded the old file here September 11:
code.google.com/p/joomlaworks/source/browse/trunk/K2/plugins/search/k2/k2.php?spec=svn67&r=55
The errors have gone and search working as far as I can tell.
There must have been good reasons for K2 to update the file so it can only be a temporary fix which works.
Hils
Please Log in or Create an account to join the conversation.
- James McCarthy
-
- Offline
- Junior Member
- Posts: 31
Please Log in or Create an account to join the conversation.
- James McCarthy
-
- Offline
- Junior Member
- Posts: 31
Please Log in or Create an account to join the conversation.
- Arturo Guzman
-
- Offline
- New Member
- Posts: 8
The problem is when trying to search in the tags, if you turn it off from the Search_K2 plugin parameters, the error won't show anymore, of course you'll lose the tag searching functionality.
As far as I can tell, this is a bug in the K2 Search plugin, since it uses MySQL's MATCH function incorrectly. So the best thing to do is to go back to the old plugin, where the search is done using the LIKE operator.
In the MySQL Site it explains that the MATCH function in NATURAL LANGUAGE MODE performs a search against a text collection, and a text collection can only exist within a table. When the plugin tries to search the tags it adds a foreign column into the MATCH function, which of course breaks the query.
Art.
Please Log in or Create an account to join the conversation.
- philip locke
-
- Offline
- New Member
- Posts: 18
We have simply used the standard Joomla search (mod_search). Because, as Fotis has pointed out recently the K2 search box in mod_k2_tools module is simply a form which calls up com_search but pulls back in a blog view.
So what have we done...
Using the latest J! & latest K2 v2.2 - as seen on this website: www.mousetrap.org.uk
1. We have enabled the J! mod_search
2. Created an HTML override in the templates folder
3. We copied the com_search into the templates/my-template/html/
We didn't want the K2, Articles, Sections, Categories, Web Links, etc, checkboxes to show in the search results page, so we did the following:
1. In Admin, went to Plugin Manager and disabled the following:
...Search - Content
...Search - Weblinks
...Search - Contacts
...Search - Categories
...Search - Sections
...Search - Newsfeeds
2. We left the 'Search - K2' plugin enabled, as we wanted to search all K2 items.
The only problem is that the K2 checkbox was still visable on the search results page, so we did the following:
1. In the html override folder (as above - templates/my-template/html/com_search) we edited the 'default_form.php' file.
2. Deleted lines 32 to 42 (as screenshot shows)
Done ;-)
Hope this helps... or is an good altrenative for someone out there
Phil
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
Just some comments, from my test of this.
1) I have always had J! Search enabled, infact all search plugins are enabled
3) Copied com_search to my template folder Avanti.
For those that use Avanti from Joomlabamboo, there already is a com_search folder but it does not contain the same files as the original search component.
I am not interested to turn off the check boxes, to be honest, I would love to actually see some check boxes to prove it works so I have not followed any of the other steps.
At this stage, still no check boxes appear, still no indication that the results are even a search page.
Again, I noticed that there is a mod_search folder in my Avanti template folders which just contained index.html and default.php so I copied the mod_search to the template.
K2 search still not working correctly.
J! search is displaying K2 items with K2 tick box so shall now be using J! Search as default and remove K2 search.
Frustrating problem this one.
Thanks Phil, hope this help some users.
Simon
Please Log in or Create an account to join the conversation.
- Roland Wampers
-
- Offline
- New Member
- Posts: 11
Hilary Cheyne said:My temporary fix. Had the line 142 error
added RokAjax Search
extensions.joomla.org/extensions/search-a-indexing/site-sear...
Then had the line 282 error
So thanks to this thread:
Downloaded the old file here September 11:
code.google.com/p/joomlaworks/source/browse/trunk/K2/plugins...
The errors have gone and search working as far as I can tell.
There must have been good reasons for K2 to update the file so it can only be a temporary fix which works.
Hils
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
- Posts: 955
However, K2 search still produces full item not the list.
There were NO changes to Rok, it just worked upon install folowing changes to mod/com search changes.
So much has gone on over the weeked, my head is still spinning, but I will be going through all com/mod search files to compare changes.
I also have a further demo site which Rok is not working on, so will then verify the changes on that site.
Finally, I will then make 1 further virgin J! install, with K2 V2.2 and Ajaxsearch to completley test out before publishing the results.
Looks like progress has been made.
Thanks to you all.
Simon
K2Joom.com
Please Log in or Create an account to join the conversation.