- Posts: 11
COMMUNITY FORUM
Search K2 Problem
- Pomba
- Topic Author
- Offline
- New Member
Less
More
14 years 9 months ago #77813
by Pomba
Search K2 Problem was created by Pomba
Hello there,I'm having a problem with searching through my items.By choosing "All words" or "Any words" I'm not getting any results. I also get this error message; "Warning: Invalid argument supplied for foreach() in /home/xdxpnet/public_html/plugins/search/k2.php on line 282" When I choose "Exact Phrase" it works.Any way to fix it - and, where I can edit the style for searching? Certain things there I don't want to be shown.All plugins should be activated. Check out the site here.
Please Log in or Create an account to join the conversation.
- Kaleb Camacho
- Offline
- New Member
Less
More
- Posts: 3
14 years 9 months ago #77814
by Kaleb Camacho
Replied by Kaleb Camacho on topic Search K2 Problem
Hello,
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
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
Less
More
- Posts: 11
14 years 9 months ago #77815
by Pomba
Replied by Pomba on topic Search K2 Problem
Removed the error message now, but search still don't give any results.
Tried everything. Really annoying!! :-)
Tried everything. Really annoying!! :-)
Please Log in or Create an account to join the conversation.
- Pomba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
14 years 9 months ago #77816
by Pomba
Replied by Pomba on topic Search K2 Problem
Can't figure it out. Any solutions?
Please Log in or Create an account to join the conversation.
- d.k.shukla
- Offline
- Senior Member
Less
More
- Posts: 78
14 years 9 months ago #77817
by d.k.shukla
Replied by d.k.shukla on topic Search K2 Problem
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?
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
Less
More
- Posts: 4
14 years 9 months ago #77818
by Stephen Robb
Replied by Stephen Robb on topic Search K2 Problem
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')
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
Less
More
- Posts: 78
14 years 9 months ago #77819
by d.k.shukla
Replied by d.k.shukla on topic Search K2 Problem
Hi
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')
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
Less
More
- Posts: 4
14 years 9 months ago #77820
by Stephen Robb
Replied by Stephen Robb on topic Search K2 Problem
I have been doing some more analysis on this and think I have found what the problem might be (in my case at least). It's to do with the way FULLTEXT search works in MySQL. My apologies for blaming K2.
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
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
Less
More
- Posts: 955
14 years 9 months ago #77821
by Simon Wells
Replied by Simon Wells on topic Search K2 Problem
Pomba, can you post details of your fix so others know how to do it?
K2Joom
Pomba said:Removed the error message now, but search still don't give any results.
Tried everything. Really annoying!! :-)
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
Less
More
- Posts: 4
14 years 9 months ago #77822
by Donovan Ryan Hay
Replied by Donovan Ryan Hay on topic Search K2 Problem
THANKS A MILL!! Dude, you are seriously a life saver!! THANK YOU! I hope the search function gets fixed soon, but this is working 100% for now. Thanks!
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?
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.