Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Baryshev <baryshev@gmail.com>2012-10-16 23:05:11 +0400
committerIlya Baryshev <baryshev@gmail.com>2012-10-16 23:05:11 +0400
commite6524a919ee4c92d82518c2520d5c0cabc32eb47 (patch)
tree483060d8211e80e73ac19ccab3ef86deb8f71fe9 /app/contexts/search_context.rb
parentdb3d90cbcb41c5b9a62998b185c90c10f9d03968 (diff)
Wiki search
Very basic, using LIKE, and no search snippets.
Diffstat (limited to 'app/contexts/search_context.rb')
-rw-r--r--app/contexts/search_context.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/contexts/search_context.rb b/app/contexts/search_context.rb
index 6e5e8c5e9b5..9becb8d674f 100644
--- a/app/contexts/search_context.rb
+++ b/app/contexts/search_context.rb
@@ -13,6 +13,7 @@ class SearchContext
result[:projects] = Project.where(id: project_ids).search(query).limit(10)
result[:merge_requests] = MergeRequest.where(project_id: project_ids).search(query).limit(10)
result[:issues] = Issue.where(project_id: project_ids).search(query).limit(10)
+ result[:wiki_pages] = Wiki.where(project_id: project_ids).search(query).limit(10)
result
end
@@ -20,7 +21,8 @@ class SearchContext
@result ||= {
projects: [],
merge_requests: [],
- issues: []
+ issues: [],
+ wiki_pages: []
}
end
end