summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-11-03 11:15:37 +0100
committerYorhel <git@yorhel.nl>2010-11-03 11:15:37 +0100
commit697eaccab86dbf050134f758e5fe8df0be09fb1b (patch)
tree3f34d9e7b414f7d0b58fab8d18fcd02ee3c4ab02 /lib
parentc8743729e6caa9cdd3862c82f49477398051dae7 (diff)
Lowered minimum search query word to 2 characters
Searching for "ef" isn't really fun with all those results, this makes it slightly less broad.
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDBUtil.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDBUtil.pm b/lib/VNDBUtil.pm
index bda54383..f23811a9 100644
--- a/lib/VNDBUtil.pm
+++ b/lib/VNDBUtil.pm
@@ -196,7 +196,7 @@ sub normalize_query {
# remove spaces within quotes, so that it's considered as one search word
$q =~ s/"([^"]+)"/(my $s=$1)=~y{ }{}d;$s/ge;
# split into search words, normalize, and remove too short words
- return map length($_)>(/^[\x01-\x7F]+$/?2:0) ? quotemeta($_) : (), map normalize($_), split / /, $q;
+ return map length($_)>=(/^[\x01-\x7F]+$/?2:1) ? quotemeta($_) : (), map normalize($_), split / /, $q;
}