diff options
Diffstat (limited to 'src/search.php')
-rw-r--r-- | src/search.php | 4 |
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; } |