From f5ec708066ae96320c3c52c3ec97d4d22e623a4d Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 12 Feb 2012 14:38:37 +0000 Subject: [PATCH] searching for negative scores --- contrib/numeric_score/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/numeric_score/main.php b/contrib/numeric_score/main.php index 5d686e0a..8baae0a1 100644 --- a/contrib/numeric_score/main.php +++ b/contrib/numeric_score/main.php @@ -200,7 +200,7 @@ class NumericScore extends Extension { public function onSearchTermParse(SearchTermParseEvent $event) { $matches = array(); - if(preg_match("/^score(<|<=|=|>=|>)(\d+)$/", $event->term, $matches)) { + if(preg_match("/^score(<|<=|=|>=|>)(-?\d+)$/", $event->term, $matches)) { $cmp = $matches[1]; $score = $matches[2]; $event->add_querylet(new Querylet("numeric_score $cmp $score"));