Commit 971401b9 authored by Nick Thomas's avatar Nick Thomas

Search snippets via elasticsearch

parent c6b8dbaa
......@@ -19,3 +19,5 @@ module Search
end
end
end
Search::SnippetService.prepend(::EE::Search::SnippetService)
# frozen_string_literal: true
module EE
module Search
module SnippetService
extend ::Gitlab::Utils::Override
override :execute
def execute
if ::Gitlab::CurrentSettings.elasticsearch_search?
::Gitlab::Elastic::SnippetSearchResults.new(current_user, params[:search])
else
super
end
end
end
end
end
---
title: Search snippets via elasticsearch
merge_request: 10325
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment