Commit ad2b85c4 authored by Valery Sizov's avatar Valery Sizov

ES: one more fix

parent ce18fdd9
...@@ -16,10 +16,11 @@ module ApplicationSearch ...@@ -16,10 +16,11 @@ module ApplicationSearch
tokenizer: "standard", tokenizer: "standard",
filter: ["standard", "lowercase", "my_stemmer"] filter: ["standard", "lowercase", "my_stemmer"]
} }
},
filter: { filter: {
my_stemmer: { my_stemmer: {
type: "stemmer", type: "stemmer",
name: "light_german" name: "light_english"
} }
} }
} }
......
...@@ -10,7 +10,6 @@ module MergeRequestsSearch ...@@ -10,7 +10,6 @@ module MergeRequestsSearch
indexes :iid, type: :integer indexes :iid, type: :integer
indexes :target_branch, type: :string, indexes :target_branch, type: :string,
index_options: 'offsets' index_options: 'offsets'
analyzer: :my_analyzer
indexes :source_branch, type: :string, indexes :source_branch, type: :string,
index_options: 'offsets' index_options: 'offsets'
indexes :title, type: :string, indexes :title, type: :string,
......
namespace :gitlab do namespace :gitlab do
namespace :elastic do namespace :elastic do
desc "Indexing repositories" desc "Indexing repositories"
task index_repository: :environment do task index_repositories: :environment do
Repository.import Repository.import
end end
desc "Indexing all wikis" desc "Indexing all wikis"
task index_wiki: :environment do task index_wikis: :environment do
ProjectWiki.import ProjectWiki.import
end end
desc "Create indexes in the Elasticsearch from database records" desc "Create indexes in the Elasticsearch from database records"
task create_index: :environment do task index_database: :environment do
[Project, Issue, MergeRequest, Snippet, Note, Milestone].each do |klass| [Project, Issue, MergeRequest, Snippet, Note, Milestone].each do |klass|
klass.__elasticsearch__.create_index! klass.__elasticsearch__.create_index!
klass.import klass.import
......
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