Hi
I’ve tried to find a solution to this before but failed.
My site is a wildlife photography site My Site and I want people to be able to search for images AND get back what they expect.
This site is currently on 1.6.8 core but I have a licence for 1.6.9 but haven’t upgraded yet (and probably won’t unless I can sort out some of the fundamental problems I’m having with EE - most are probably my inexperience but I’m finding it all a bit of a hard slog and really need to simple things like searching to work before I go any further).
The problem is this. If I set the name=“where” to value=“word” it doesn’t respect spaces in search terms (unless you enclose the search term in “”) meaning that a search for RED KITE will return anything with the keyword RED or KITE - erroneous results returned.
If I set the name=“where” to value=“exact” it hardly does an “exact” filter. It now respects spaces but searches on parts of words too so that a search for OWL returns any image tagged with the word wildfOWL for example.
What is the solution? Am I doing something wrong? Can you layer attributes to have both “word” and “exact”.
Code below for search
Thanks
Dave Kilbey
Main search code
<div id="searchform">
<form id='searchform' method="post" action="http://www.davekilbeyphotography.co.uk/" >
<div class='hiddenFields'>
<input type="hidden" name="ACT" value="19" />
<input type="hidden" name="XID" value="51c1d7b2d110e19703e88d86cae5f0883cc37e76" />
<input type="hidden" name="RP" value="search/results" />
<input type="hidden" name="NRP" value="search/;no-results" />
<input type="hidden" name="RES" value="90" />
<input type="hidden" name="status" value="open" />
<input type="hidden" name="weblog" value="" />
<input type="hidden" name="search_in" value="entries" />
<input type="hidden" name="where" value="exact" />
<input type="hidden" name="site_id" value="1" />
</div>Simple search code
{exp:search:simple_form search_in="everywhere" no_result_page="search/no-results" status="open" id="searchform" results="90" where="exact"}
<div>
<input type="text" name="keywords" id="search" value="" /> <input type="submit" name="searchBtn" id="searchBtn" value="Search" title="Search" />
</div>
{/exp:search:simple_form}[Mod Edit: Edited out licence details]