Commit Graph

76 Commits

Author SHA1 Message Date
GitLab Bot bf53a3fd78 Add latest changes from gitlab-org/gitlab@master 2023-09-19 03:09:45 +00:00
GitLab Bot afb84634cd Add latest changes from gitlab-org/gitlab@master 2023-08-16 03:10:26 +00:00
GitLab Bot 30a8e05475 Add latest changes from gitlab-org/gitlab@master 2023-08-04 12:06:55 +00:00
GitLab Bot 9cf7b70ac7 Add latest changes from gitlab-org/gitlab@master 2023-08-01 18:10:40 +00:00
GitLab Bot 5ab92edc77 Add latest changes from gitlab-org/gitlab@master 2022-12-02 06:08:59 +00:00
GitLab Bot a466e9450d Add latest changes from gitlab-org/gitlab@master 2022-11-29 15:07:02 +00:00
GitLab Bot 7912017a13 Add latest changes from gitlab-org/gitlab@master 2022-11-15 12:09:24 +00:00
GitLab Bot da12067d6b Add latest changes from gitlab-org/gitlab@master 2021-08-13 09:09:58 +00:00
GitLab Bot 63fd08e6b4 Add latest changes from gitlab-org/gitlab@master 2021-08-11 21:10:33 +00:00
GitLab Bot 96acc69fae Add latest changes from gitlab-org/gitlab@master 2021-06-15 12:10:11 +00:00
GitLab Bot 4fd77e112f Add latest changes from gitlab-org/gitlab@master 2020-11-05 00:09:16 +00:00
GitLab Bot 8a902a9508 Add latest changes from gitlab-org/gitlab@master 2020-10-22 03:08:25 +00:00
GitLab Bot b6724a211e Add latest changes from gitlab-org/gitlab@master 2020-10-07 06:09:03 +00:00
GitLab Bot 692f4b734f Add latest changes from gitlab-org/gitlab@master 2020-09-03 21:08:18 +00:00
GitLab Bot f2eb66fef8 Add latest changes from gitlab-org/gitlab@master 2020-08-21 03:10:16 +00:00
GitLab Bot 71da5de44f Add latest changes from gitlab-org/gitlab@master 2020-08-05 15:09:59 +00:00
GitLab Bot c4844aea3f Add latest changes from gitlab-org/gitlab@master 2020-06-03 00:08:38 +00:00
GitLab Bot 6c577c9ada Add latest changes from gitlab-org/gitlab@master 2020-05-25 03:08:11 +00:00
GitLab Bot 9bded6fb22 Add latest changes from gitlab-org/gitlab@master 2020-05-20 06:08:06 +00:00
GitLab Bot 2e4dcef627 Add latest changes from gitlab-org/gitlab@master 2020-05-08 15:09:28 +00:00
GitLab Bot 17c8111494 Add latest changes from gitlab-org/gitlab@master 2020-05-07 21:09:26 +00:00
GitLab Bot cfaf1cca44 Add latest changes from gitlab-org/gitlab@master 2020-02-16 21:08:53 +00:00
GitLab Bot e4ea43b2b8 Add latest changes from gitlab-org/gitlab@master 2020-01-27 21:08:47 +00:00
Markus Koller 49c83155cc
Load search result counts asynchronously
Querying all counts for the different search results in the same request
led to timeouts, so we now only calculate the count for the *current*
search results, and request the others in separate asynchronous calls.
2019-08-12 22:01:15 +02:00
Yorick Peterse a4e13a5966
Backport EE changes to ProjectSearchResults
EE made some changes to the project_ids_relation method, but these were
not backported to CE.
2019-08-08 13:34:07 +02:00
Patrick Derichs 0e99daae4a Use NotesFinder in IssuableActions module
Remove project from NotesFinder constructor

Add project parameter to specs

Also look for methods in private scope

Fix specs to match new NotesFinder constructor
2019-08-01 10:42:42 +02:00
Felipe Artur b70b43d07e Resolve: Milestones leaked via search API
Fix milestone titles being leaked using search API
when users cannot read milestones
2019-05-20 11:08:34 -03:00
Francisco Javier López 68e533dc21 Add improvements to the global search process
Removed the conditions added to
Project.with_feature_available_for_user, and moved to the
IssuableFinder. Now, we ensure that, in the projects retrieved
in the Finder, the user has enough access for the feature.
2019-05-07 11:08:25 +00:00
Alexis Reigel 241f38b01d
project's user search includes group members too 2019-03-14 18:21:02 +01:00
Alexis Reigel 22f44b50d8
add users search results to project scoped search 2019-03-14 18:16:03 +01:00
Jan Provaznik 58bfd73331 Optimized file search to work without limits
* removed 100 limit on file search results because we
  load all results anyway
* expensive processing (parsing match content, utf encoding)
  is done only for selected page in paginated output
2018-12-06 09:25:09 +01:00
Mark Chao a4ba973e24 Allow FoundBlob to access language from gitattributes
Extract language_from_git_attributes as a concern so it can
ben included in two blob classes.
2018-10-30 15:44:55 +08:00
gfyoung c858f70d07 Enable frozen string for lib/gitlab/*.rb 2018-10-22 07:00:50 +00:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Francisco Javier López 6354d55470 Fixing bug with wiki ref in ProjectSearchResults 2018-07-20 13:49:30 +00:00
Francisco Javier López 7350eb1fa8 Add ability to search wiki titles 2018-06-04 11:41:37 +00:00
Jan Provaznik 91f8656c2c Disable greedy mode when matching filename 2018-05-15 10:20:18 +00:00
Jasper Maes d17d3ec7f7 Split repository search result on \n instead of $ to prevent the items of the array to start with a newline. Remove the strip from parsing the search result to keep result endlines. 2018-03-19 19:09:31 +01:00
Jan Provaznik 741caf93e1 Use limited count queries also for scoped searches 2018-03-05 13:25:56 +00:00
Jarka Kadlecová b0b4ae1875 API - Include project in commits&blobs search results 2018-02-14 09:00:26 +01:00
Jarka Kadlecová 1b2400b529 Return only limited pagination headers for search API endpoints 2018-02-06 17:58:18 +01:00
Jarka Kadlecová 7381944565 Support search in API 2018-02-06 16:02:02 +01:00
Jan Provaznik 090ca9c33e Use limit for search count queries
Search query is especially slow if a user searches a generic string
which matches many records, in such case search can take tens of
seconds or time out. To speed up the search query, we search only for
first 1000 records, if there is >1000 matching records we just display
"1000+" instead of precise total count supposing that with such amount
the exact count is not so important for the user.

Because for issues even limited search was not fast enough, 2-phase
approach is used for issues: first we use simpler/faster query to get
all public issues, if this exceeds the limit, we just return the limit.
If the amount of matching results is lower than limit, we re-run more
complex search query (which includes also confidential issues).
Re-running the complex query should be fast enough in such case because the
amount of matching issues is lower than limit.

Because exact total_count is now limited, this patch also switches to
to "prev/next" pagination.

Related #40540
2018-01-23 22:33:42 +01:00
Sean McGivern 82f4564fb7 Fix project search results for digits surrounded by colons
A file containing /:\d+:/ in its contents would break the search results if
those contents were part of the results, because we were splitting on colons,
which can't work with untrusted input.

Changing to use the null byte as a separator is much safer.
2018-01-16 11:56:07 +00:00
haseeb 869877ab26 fix for special charecter in file names 2017-11-30 09:57:58 +00:00
Valery Sizov f6c4ccd1f2 Backport FileFinder from EE 2017-05-12 13:21:30 +03:00
Douwe Maan 61a81a3ac2 Merge branch '31157-respect-project-features-in-wiki-search' into 'security'
Respect project features in wiki and blob search

See merge request !2089
2017-05-10 16:44:20 +02:00
Nick Thomas 7f32ad7097 Fix blob highlighting in search 2017-04-03 18:51:44 +01:00
YarNayar 99404a5851 Search feature: redirects to commit page if query is commit sha and only commit found
See !8028 and #24833
2017-01-24 14:58:00 +03:00
YarNayar dd3ddcd72b Allows to search within project by commit's hash
Was proposed in #24833
2017-01-24 14:56:00 +03:00