gitlab-org--gitlab-foss/lib/api/v3
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
..
award_emoji.rb
boards.rb
branches.rb Improve performance of the /projects/:id/repository/branches API endpoint 2017-11-06 13:31:23 +01:00
broadcast_messages.rb
builds.rb Use preload instead of includes to avoid joins 2018-01-15 22:04:08 +01:00
commits.rb Add option to disable commit stats to commit API 2018-01-09 11:36:12 +00:00
deploy_keys.rb Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into 'security-10-3' 2018-01-16 17:04:51 -08:00
deployments.rb
entities.rb Merge branch 'security-10-3-do-not-expose-passwords-or-tokens-in-service-integrations-api' into 'security-10-3' 2018-01-16 17:04:38 -08:00
environments.rb
files.rb
groups.rb
helpers.rb Filter archived project in API v3 only if param present 2017-06-21 20:04:25 +03:00
issues.rb
labels.rb EE-BACKPORT group boards 2018-01-04 17:28:10 -02:00
members.rb Fix error on empty query for Members API 2018-01-21 16:36:55 +00:00
merge_request_diffs.rb Removes default scope from sortable 2017-09-07 13:01:59 +01:00
merge_requests.rb Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
milestones.rb Removes default scope from sortable 2017-09-07 13:01:59 +01:00
notes.rb Whitelist or fix additional Gitlab/PublicSend cop violations 2017-08-14 12:14:11 -04:00
pipelines.rb
project_hooks.rb Fixup POST /v3/:id/hooks and PUT /v3/:id/hooks/:hook_id 2017-07-28 16:27:10 +00:00
project_snippets.rb Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
projects.rb Use limit for search count queries 2018-01-23 22:33:42 +01:00
repositories.rb Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
runners.rb Adds Rubocop rule for line break after guard clause 2017-11-16 17:58:29 +01:00
services.rb Merge branch 'security-10-3-do-not-expose-passwords-or-tokens-in-service-integrations-api' into 'security-10-3' 2018-01-16 17:04:38 -08:00
settings.rb Allow password authentication to be disabled entirely 2017-11-23 13:16:14 +00:00
snippets.rb Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
subscriptions.rb
system_hooks.rb
tags.rb Remove 'Repo' prefix from API entites 2017-10-05 19:48:05 +11:00
templates.rb Remove 'Repo' prefix from API entites 2017-10-05 19:48:05 +11:00
time_tracking_endpoints.rb Only include the user's ID in the time_spent command's update hash 2017-12-19 15:45:08 -06:00
todos.rb Avoid plucking Todo ids and use sub-queries instead 2017-08-03 16:31:05 +02:00
triggers.rb Use pipeline.trigger_requests.last 2017-09-05 01:22:57 +09:00
users.rb Initial attempt at refactoring API scope declarations. 2017-06-28 07:17:13 +00:00
variables.rb