@results+=@project.issues.find(:all,:limit=>limit,:include=>:author,:conditions=>[(["(LOWER(subject) like ? OR LOWER(description) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort])if@scope.include?'issues'
@results+=@project.news.find(:all,:limit=>limit,:conditions=>[(["(LOWER(title) like ? OR LOWER(description) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort],:include=>:author)if@scope.include?'news'
@results+=@project.documents.find(:all,:limit=>limit,:conditions=>[(["(LOWER(title) like ? OR LOWER(description) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort])if@scope.include?'documents'
@results+=@project.wiki.pages.find(:all,:limit=>limit,:include=>:content,:conditions=>[(["(LOWER(title) like ? OR LOWER(text) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort])if@project.wiki&&@scope.include?('wiki')
@results+=@project.repository.changesets.find(:all,:limit=>limit,:conditions=>[(["(LOWER(comments) like ?)"]*like_tokens.size).join(operator),*(like_tokens).sort])if@project.repository&&@scope.include?('changesets')
@results+=Message.find(:all,:include=>:board,:limit=>limit,:conditions=>[(["(LOWER(subject) like ? OR LOWER(content) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort])if@scope.include?'messages'
@results+=Project.find(:all,:limit=>limit,:conditions=>[(["(LOWER(name) like ? OR LOWER(description) like ?)"]*like_tokens.size).join(operator),*(like_tokens*2).sort])if@scope.include?'projects'
end
# if only one project is found, user is redirected to its overview