match better, so user_id=123 doesn't hit id=123
This commit is contained in:
@ -77,7 +77,7 @@ class NumericScore implements Extension {
|
||||
|
||||
if($event instanceof SearchTermParseEvent) {
|
||||
$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->set_querylet(new Querylet("numeric_score $cmp $score"));
|
||||
|
Reference in New Issue
Block a user