Commit 8ee02f5c authored by Valery Sizov's avatar Valery Sizov

Merge branch 'es_fix' into 'master'

Fix elasticsearch indexing for newly created snippets



See merge request !165
parents 69980498 0e5644f3
......@@ -7,6 +7,7 @@ v 8.5.0 (unreleased)
v 8.4.4
- Re-introduce "Send email to users" link in Admin area
- Fix category values for Jenkins and JenkinsDeprecated services
- Fix Elasticsearch indexing for newly added snippets
v 8.4.3
- Elasticsearch: fix partial blob indexing on push
......
......@@ -16,4 +16,8 @@
#
class PersonalSnippet < Snippet
# Elastic search configuration (it does not support STI)
document_type 'snippet'
index_name [Rails.application.class.parent_name.downcase, 'snippet', Rails.env].join('-')
include Elastic::SnippetsSearch
end
......@@ -16,6 +16,11 @@
#
class ProjectSnippet < Snippet
# Elastic search configuration (it does not support STI)
document_type 'snippet'
index_name [Rails.application.class.parent_name.downcase, 'snippet', Rails.env].join('-')
include Elastic::SnippetsSearch
belongs_to :project
belongs_to :author, class_name: "User"
......
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