I'll page it, can also see what it does on 1000 projects. I expect it would be fine, 10k or 100k maybe not                                                                                                                                                                                                                                                                          Sent from my BlackBerry 10 smartphone.                                                                                                                                                                                                                                        From: Dmitriy ZaporozhetsSent: Sunday, September 22, 2013 5:19 AMTo: gitlabhq/gitlabhqReply To: gitlabhq/gitlabhqCc: Izaak (John) AlpertSubject: Re: [gitlabhq] Added search for projects by name to api (#5146)In lib/api/projects.rb:
> @@ -262,6 +261,22 @@ def handle_project_member_errors(errors)
>            {message: "Access revoked", id: params[:user_id].to_i}
>          end
>        end
> +
> +      # search for projects current_user has access to
> +      #
> +      # Parameters:
> +      #   query (required) - A string contained in the project name
> +      # Example Request:
> +      #   GET /projects/search/:query
> +      get "/search/:query" do
> +        ActiveRecord::Base.logger = Logger.new(STDOUT)
> +        projects = Project.where("name LIKE (?)", "%#{params[:query]}%")
> +
> +        projects = projects.select { |project|

in case of thousand projects its not a best idea. 
Maybe do 2 queries? current_user.authorized_projects.search && Project.public.search

—Reply to this email directly or view it on GitHub.