summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-01-10 14:15:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-01-10 14:15:12 +0000
commitfe7d65922b634e264d96178fec1588aae94dc1ba (patch)
treeb317f54457a08abdb86924b6ef68486cf9a25f5d /app/controllers
parentd7c9886b8c6d8b7c997ef0bddcd497cf094a4012 (diff)
downloadredmine-fe7d65922b634e264d96178fec1588aae94dc1ba.tar.gz
redmine-fe7d65922b634e264d96178fec1588aae94dc1ba.zip
Fixed: can not search for 2 letters word (#4381).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3306 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/search_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index 68687347e..241da0bd8 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -62,8 +62,8 @@ class SearchController < ApplicationController
# extract tokens from the question
# eg. hello "bye bye" => ["hello", "bye bye"]
@tokens = @question.scan(%r{((\s|^)"[\s\w]+"(\s|$)|\S+)}).collect {|m| m.first.gsub(%r{(^\s*"\s*|\s*"\s*$)}, '')}
- # tokens must be at least 3 character long
- @tokens = @tokens.uniq.select {|w| w.length > 2 }
+ # tokens must be at least 2 characters long
+ @tokens = @tokens.uniq.select {|w| w.length > 1 }
if !@tokens.empty?
# no more than 5 tokens to search for