summaryrefslogtreecommitdiffstats
path: root/src/search.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.php')
-rw-r--r--src/search.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/search.php b/src/search.php
index 29bbc7a..7075ea3 100644
--- a/src/search.php
+++ b/src/search.php
@@ -193,6 +193,10 @@ function filter_results($docs,&$requiredWords,&$forbiddenWords)
function compare_rank($a,$b)
{
+ if ($a["rank"] == $b["rank"])
+ {
+ return 0;
+ }
return ($a["rank"]>$b["rank"]) ? -1 : 1;
}