diff options
author | Yorhel <git@yorhel.nl> | 2010-11-03 11:15:37 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-11-03 11:15:37 +0100 |
commit | 697eaccab86dbf050134f758e5fe8df0be09fb1b (patch) | |
tree | 3f34d9e7b414f7d0b58fab8d18fcd02ee3c4ab02 /lib/VNDBUtil.pm | |
parent | c8743729e6caa9cdd3862c82f49477398051dae7 (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/VNDBUtil.pm')
-rw-r--r-- | lib/VNDBUtil.pm | 2 |
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; } |