Search multiple words in Search block

Permalink
The Search block can't search multiple words. Is this just not possible with the default block? Can someone confirm this.

Using 5.7.13

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi vince8864,

I don't believe so.

Using a default install with sample content, I searched for "neque" and "rhoncus" and they both returned results. When searching for "neque rhoncus", no results are returned, even though they are on two pages together.

I tested with 5.7.5.13 and the latest develop branch.
Gondwana replied on at Permalink Reply
Gondwana
The block doco admits that the search block is pretty simplistic. However, the API doco indicates that hooks are in place to enable more sophisticated searches using MySQL FULLTEXT. I've started tinkering with how to expose that in a block but I don't expect it to see the light of day any time soon. Someone competent may be able to whip something up quickly.
vince8864 replied on at Permalink Reply
I see. any alternatives to recommend? what do you guys usually use instead?
hutman replied on at Permalink Reply
hutman
Have a look at this forum post - I think this person did what you're looking to do

https://www.concrete5.org/community/forums/customizing_c5/filterbyke...
vince8864 replied on at Permalink Reply
I copy and paste the code but it said redefined $keyword. Oh well, I don't feel like messing with concrete file anyway. I realize even concrete5 website itself just uses Google Custom Search. I guess I'll use that as well. Thanks.
Steevb replied on at Permalink Reply
Steevb
I started using a third party php search engine. Just needs a bit tweaking.

View post, it might help: https://www.concrete5.org/community/forums/chat/site-search/#903432...
vince8864 replied on at Permalink Reply
in search block controller.php

if (isset($_REQUEST['query'])) {
$search_vars = explode(' ',$_REQUEST['query']);
foreach($search_vars as $key=>$var){
$ipl->filterByKeywords($var);
}
}

https://www.concrete5.org/community/forums/chat/how-to-search-multip...

I found this in older post. It works on multi words. Though highlight doesn't work on multi words but that's fine as I only wanted to search for page title (product name) which is a link anyway.