Page 1 of 1
Quicksearch: configuration AND instead of OR
Posted: Wed Apr 14, 2010 9:42 am
by aschlemmer
Hi!
Quicksearch is using OR by default when searching for two or more terms.
How to change that into AND?
Thanks and regards,
Achim
Re: Quicksearch: configuration AND instead of OR
Posted: Wed Apr 14, 2010 6:15 pm
by garvinhicking
Hi!
Either prefix each word with "+", or if you want to fixate that in code, you need to write an event plugin that hooks into frontend_configure and modifies $serendipity['GET']['searchTerm'] to do that automatically, or write a javascript that modifies your string to append "+" for each word. You could also even put that into serendipity_config_local.inc.php to modify the code using PHP.
Note by
http://dev.mysql.com/doc/refman/5.1/en/ ... olean.html that this default "OR" logic is a MySQL thing...
Regards,
Garvin
Re: Quicksearch: configuration AND instead of OR
Posted: Wed Apr 14, 2010 6:45 pm
by aschlemmer
Thanks, Garvin -- I'll dig deeper into this to find a nice solution.
-Achim