diff --git a/trunk/config/backend.xml b/trunk/config/backend.xml index 4dcd390..13744ff 100644 --- a/trunk/config/backend.xml +++ b/trunk/config/backend.xml @@ -18,7 +18,7 @@ 3 10 500 - relevance + relevance desc diff --git a/trunk/functions.pl b/trunk/functions.pl index 8c771f7..941a70c 100644 --- a/trunk/functions.pl +++ b/trunk/functions.pl @@ -252,6 +252,10 @@ sub get_sqlquery { $dbquery .= " order by relevance"; } + elsif($order eq 'random') + { + $dbquery .= " order by rand()"; + } else { $dbquery .= " order by $config->{'search_order_default'}";