Skip to content
Snippets Groups Projects
Commit ca4856a3 authored by Valery Sizov's avatar Valery Sizov
Browse files

Remove GitLab specific code

parent 888bada4
No related branches found
No related tags found
1 merge request!18Parent project
Pipeline #
Loading
Loading
@@ -437,29 +437,9 @@ module Elasticsearch
}
end
 
if options[:project_ids]
conditions = [{ terms: { id: options[:project_ids] }}]
if options[:public_and_internal_projects]
conditions << {
term: { visibility_level: Project::PUBLIC }
}
conditions << {
term: { visibility_level: Project::INTERNAL }
}
end
query_hash[:query][:bool][:filter] == {
has_parent: {
parent_type: 'project',
query: {
bool: {
should: conditions
}
}
}
}
if options[:additional_filter]
query_hash[:query][:bool][:filter] ||= []
query_hash[:query][:bool][:filter] << options[:additional_filter]
end
 
if options[:highlight]
Loading
Loading
@@ -524,29 +504,9 @@ module Elasticsearch
}
end
 
if options[:project_ids]
conditions = [{ terms: { id: options[:project_ids] }}]
if options[:public_and_internal_projects]
conditions << {
term: { visibility_level: Project::PUBLIC }
}
conditions << {
term: { visibility_level: Project::INTERNAL }
}
end
query_hash[:query][:bool][:filter] << {
has_parent: {
parent_type: 'project',
query: {
bool: {
should: conditions
}
}
}
}
if options[:additional_filter]
query_hash[:query][:bool][:filter] ||= []
query_hash[:query][:bool][:filter] << options[:additional_filter]
end
 
if options[:language]
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment