Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
504608d1
Commit
504608d1
authored
Feb 07, 2018
by
Ian Baum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolving conflict with lib/api/search.rb
parent
2df798a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
25 deletions
+0
-25
lib/api/search.rb
lib/api/search.rb
+0
-25
No files found.
lib/api/search.rb
View file @
504608d1
...
...
@@ -18,11 +18,8 @@ module API
snippet_blobs:
Entities
::
Snippet
}.
freeze
<<<<<<<
HEAD
ELASTICSEARCH_SCOPES
=
%w(wiki_blobs blobs commits)
.
freeze
=======
>>>>>>>
upstream
/
master
def
search
(
additional_params
=
{})
search_params
=
{
scope:
params
[
:scope
],
...
...
@@ -38,15 +35,12 @@ module API
end
def
process_results
(
results
)
<<<<<<<
HEAD
return
[]
if
results
.
empty?
if
results
.
is_a?
(
Elasticsearch
::
Model
::
Response
::
Response
)
return
paginate
(
results
).
map
{
|
blob
|
Gitlab
::
Elastic
::
SearchResults
.
parse_search_result
(
blob
)
}
end
=======
>>>>>>>
upstream
/
master
case
params
[
:scope
]
when
'wiki_blobs'
paginate
(
results
).
map
{
|
blob
|
Gitlab
::
ProjectSearchResults
.
parse_search_result
(
blob
)
}
...
...
@@ -64,7 +58,6 @@ module API
def
entity
SCOPE_ENTITY
[
params
[
:scope
].
to_sym
]
end
<<<<<<<
HEAD
def
check_elasticsearch_scope!
if
ELASTICSEARCH_SCOPES
.
include?
(
params
[
:scope
])
&&
!
elasticsearch?
...
...
@@ -75,8 +68,6 @@ module API
def
elasticsearch?
Gitlab
::
CurrentSettings
.
elasticsearch_search?
end
=======
>>>>>>>
upstream
/
master
end
resource
:search
do
...
...
@@ -88,7 +79,6 @@ module API
requires
:scope
,
type:
String
,
desc:
'The scope of search, available scopes:
<<<<<<< HEAD
projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs,
if Elasticsearch enabled: wiki_blobs, blobs, commits'
,
values:
%w(projects issues merge_requests milestones snippet_titles snippet_blobs
...
...
@@ -98,13 +88,6 @@ module API
get
do
check_elasticsearch_scope!
=======
projects
,
issues
,
merge_requests
,
milestones
,
snippet_titles
,
snippet_blobs
',
values: %w(projects issues merge_requests milestones snippet_titles snippet_blobs)
use :pagination
end
get do
>>>>>>> upstream/master
present
search
,
with:
entity
end
end
...
...
@@ -119,7 +102,6 @@ module API
requires
:scope
,
type:
String
,
desc:
'The scope of search, available scopes:
<<<<<<<
HEAD
projects, issues, merge_requests, milestones,
if Elasticsearch enabled: wiki_blobs, blobs, commits'
,
values:
%w(projects issues merge_requests milestones wiki_blobs blobs commits)
...
...
@@ -127,13 +109,6 @@ module API
end
get
':id/-/search'
do
check_elasticsearch_scope!
=======
projects, issues, merge_requests, milestones',
values: %w(projects issues merge_requests milestones)
use :pagination
end
get ':id/
-
/search' do
>>>>>>> upstream/m
aster
find_group!
(
params
[
:id
])
present
search
(
group_id:
params
[
:id
]),
with:
entity
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment