Commit graph

19 commits

Author SHA1 Message Date
Jan Provaznik
d2f1d585e1 Skip projects filter on merge requests search
When searching for merge requests, an additional subquery
is added which by default filters only merge requests which belong
to source or target project user has permission for.

This filter is not needed because more restrictive filter
which checks if user has permission for target project
is used in the query.

So unless a custom projects filter is used by user, it's possible
to skip the default projects filter and speed up the final query.

Related to #40540
2017-12-21 15:43:14 +01:00
Nick Thomas
ab529cddac Refactor group search out of global search 2017-04-18 15:41:17 +01:00
Jacopo
b996a82ff4 ProjectsFinder should handle more options
Extended ProjectFinder in order to handle the following options:
 - current_user - which user use
 - project_ids_relation: int[] - project ids to use
 - params:
   -  trending: boolean
   -  non_public: boolean
   -  starred: boolean
   -  sort: string
   -  visibility_level: int
   -  tags: string[]
   -  personal: boolean
   -  search: string
   -  non_archived: boolean

GroupProjectsFinder now inherits from ProjectsFinder.
Changed the code in order to use the new available options.
2017-04-06 07:11:37 +02:00
Nick Thomas
099acf714f Backport differences in global search from EE to CE 2017-04-04 12:57:16 +01:00
Dongqing Hu
b0ab0e4eff Refactor SearchController#show 2017-03-31 13:03:55 +00:00
Dmitriy Zaporozhets
ba2d7eda61 Improve search within group logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-01-30 17:34:14 +02:00
Dmitriy Zaporozhets
d6febcaf3e Include nested groups items into search results
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-01-30 17:33:48 +02:00
Douglas Barbosa Alexandre
f2ba4e3d36 Restrict access to confidential issues on search results 2016-03-17 20:55:59 -03:00
Yorick Peterse
013542965c Refactor Gitlab::SearchResults
Instead of plucking IDs this class now uses ActiveRecord::Relation
objects. Plucking IDs is problematic as searching for projects can lead
to a huge amount of IDs being loaded into memory only to be used as an
argument for another query (instead of just using a sub-query).
2016-03-11 15:25:22 -05:00
zenati
b0de6e9ae2 An in_namespace scope is already present 2015-06-09 13:42:01 +02:00
Dmitriy Zaporozhets
ede08dbdd7
Implement search page with filtering of results and pagination
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-27 09:57:50 +03:00
Dmitriy Zaporozhets
e7cf10e446 Merge pull request #5531 from NotSqrt/add-search
Add ability to search in issue description and issue comments
2014-06-24 10:36:04 +03:00
Dmitriy Zaporozhets
0fdce4a52b
Refactor some search scopes to prevent wierd behaviour and PG::Error issues
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-05 20:37:35 +03:00
NotSqrt
15e0ab498d Update ability to search in issue descriptions and comments 2014-05-15 19:54:19 +02:00
Dmitriy Zaporozhets
17a9ecf8cf
Remove confusing code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-14 14:43:50 +02:00
Dmitriy Zaporozhets
e07b2f527f
Fix global search
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-14 14:41:28 +02:00
Jason Hollingsworth
2f69213e3f Allow access to groups with public projects.
Fixed Group avatars to only display when user has read
permissions to at least one project in the group.
2014-02-20 09:26:38 -06:00
skv
a3f645ef51 Remove deprecated finders 2014-01-19 23:39:56 +04:00
Dmitriy Zaporozhets
1d2bdb4d58
Move all Context classes into Services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-16 19:03:42 +02:00
Renamed from app/contexts/search/global_context.rb (Browse further)