Well, I managed to (hopefully) improve the default search function without much effort. I wanted to make the Exact Phrase option the default one, to minimize useless search results. I think most people think that a search function actually searches for their exact input (also on Google). So I have changed 3 things:
1. the search template header field in the backend settings. I have changed the order of the radio buttons and put them each on a different line. The new code is:
<input type="radio" name="match" id="match_exact" value="exact"[EXACT_CHECKED] />
<label for="match_exact"><strong>The exact search phrase</strong> must be present on the page</label><br />
<input type="radio" name="match" id="match_all" value="all"[ALL_CHECKED] />
<label for="match_all"><strong>All search terms</strong> must be present on the page</label><br />
<input type="radio" name="match" id="match_any" value="any"[ANY_CHECKED] />
<label for="match_any"><strong>Some search terms</strong> must be present on the page</label>
2. the default radio button. In the file search.php I have changed the code on lines 172-181 (WB 2.8.2) to:
// Get the search type
$match = '';
if(isset($_REQUEST['match'])) {
if($_REQUEST['match']=='any') $match = 'any';
elseif($_REQUEST['match']=='all') $match = 'all';
elseif($_REQUEST['match']=='exact') $match = 'exact';
else $match = 'exact';
} else {
$match = 'exact';
}
3. the radio button labels. The default labels are way too technical. Regular site visitors don't understand logical operators and how search functions work. So I have changed the labels to regular language, as can be seen in my first point above. Maybe the labels can be improved, some real live users testing can be done to see if people understand the new labels.