Commit graph

9 commits

Author SHA1 Message Date
Dmitriy Zaporozhets
424b42d6e9
Fix 500 error on empty search in project
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-25 15:01:02 +03:00
Dmitriy Zaporozhets
4b65b0e0f5
Fix wiki
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-25 13:56:23 +03:00
Dmitriy Zaporozhets
6b7e80cb19
Prevent 500 error when search wiki for non-existing repo
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-09 17:56:33 +03:00
Ralf Seidler
9edf6d4dd0 Fixed trailing white space 2014-09-06 20:42:11 +02:00
Ralf Seidler
23241c181c Fixed houndci complaining over too long lines 2014-09-06 11:46:14 +02:00
Ralf Seidler
d93b046c4c Added search wiki feature 2014-09-05 13:36:43 +02:00
Dmitriy Zaporozhets
c5c906fe64
Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-27 15:26:35 +03:00
Dmitriy Zaporozhets
9e5bc43263
Pass scope and page to Gitlab::SearchResults#objects instead of initialize
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-27 00:04:14 +03:00
Dmitriy Zaporozhets
9a4ef7e7eb
Search results libraries added
Gitlab::SearchResults and Gitlab::ProjectSearchResults are libraries we
are going to use to get search results based on query, enitity type and
pagination.

It will allow us to get only issues from project #23 where title or
description includes 'foo'.

Ex:

search_results = Gitlab::ProjectSearchResults.new(project.id, 'foo', 'issues')

search_results.objects => # [<Issues #23>, <Issues #34>]
search_results.issues_count => 2
search_results.total_count => 12 (it includes results from comments and
merge requests too)

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-26 23:32:41 +03:00