Commit 6f712321 authored by Valery Sizov's avatar Valery Sizov

Elastic 5 update. Update mapping to be compatible with ES 5

parent f74ea853
...@@ -7,14 +7,14 @@ module Elastic ...@@ -7,14 +7,14 @@ module Elastic
mappings _parent: { type: 'project' } do mappings _parent: { type: 'project' } do
indexes :id, type: :integer indexes :id, type: :integer
indexes :iid, type: :integer, index: :not_analyzed indexes :iid, type: :integer
indexes :title, type: :string, indexes :title, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :description, type: :string, indexes :description, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :created_at, type: :date indexes :created_at, type: :date
indexes :updated_at, type: :date indexes :updated_at, type: :date
indexes :state, type: :string indexes :state, type: :text
indexes :project_id, type: :integer indexes :project_id, type: :integer
indexes :author_id, type: :integer indexes :author_id, type: :integer
indexes :assignee_id, type: :integer indexes :assignee_id, type: :integer
......
...@@ -8,18 +8,18 @@ module Elastic ...@@ -8,18 +8,18 @@ module Elastic
mappings _parent: { type: 'project' } do mappings _parent: { type: 'project' } do
indexes :id, type: :integer indexes :id, type: :integer
indexes :iid, type: :integer indexes :iid, type: :integer
indexes :target_branch, type: :string, indexes :target_branch, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :source_branch, type: :string, indexes :source_branch, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :title, type: :string, indexes :title, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :description, type: :string, indexes :description, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :created_at, type: :date indexes :created_at, type: :date
indexes :updated_at, type: :date indexes :updated_at, type: :date
indexes :state, type: :string indexes :state, type: :text
indexes :merge_status, type: :string indexes :merge_status, type: :text
indexes :source_project_id, type: :integer indexes :source_project_id, type: :integer
indexes :target_project_id, type: :integer indexes :target_project_id, type: :integer
indexes :author_id, type: :integer indexes :author_id, type: :integer
......
...@@ -7,9 +7,9 @@ module Elastic ...@@ -7,9 +7,9 @@ module Elastic
mappings _parent: { type: 'project' } do mappings _parent: { type: 'project' } do
indexes :id, type: :integer indexes :id, type: :integer
indexes :title, type: :string, indexes :title, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :description, type: :string, indexes :description, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :project_id, type: :integer indexes :project_id, type: :integer
indexes :created_at, type: :date indexes :created_at, type: :date
......
...@@ -7,7 +7,7 @@ module Elastic ...@@ -7,7 +7,7 @@ module Elastic
mappings _parent: { type: 'project' } do mappings _parent: { type: 'project' } do
indexes :id, type: :integer indexes :id, type: :integer
indexes :note, type: :string, indexes :note, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :project_id, type: :integer indexes :project_id, type: :integer
indexes :created_at, type: :date indexes :created_at, type: :date
......
...@@ -7,16 +7,16 @@ module Elastic ...@@ -7,16 +7,16 @@ module Elastic
mappings do mappings do
indexes :id, type: :integer indexes :id, type: :integer
indexes :name, type: :string, indexes :name, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :path, type: :string, indexes :path, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :name_with_namespace, type: :string, indexes :name_with_namespace, type: :text,
index_options: 'offsets', index_options: 'offsets',
analyzer: :my_ngram_analyzer analyzer: :my_ngram_analyzer
indexes :path_with_namespace, type: :string, indexes :path_with_namespace, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :description, type: :string, indexes :description, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :namespace_id, type: :integer indexes :namespace_id, type: :integer
indexes :created_at, type: :date indexes :created_at, type: :date
......
...@@ -7,15 +7,15 @@ module Elastic ...@@ -7,15 +7,15 @@ module Elastic
mappings do mappings do
indexes :id, type: :integer indexes :id, type: :integer
indexes :title, type: :string, indexes :title, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :file_name, type: :string, indexes :file_name, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :content, type: :string, indexes :content, type: :text,
index_options: 'offsets' index_options: 'offsets'
indexes :created_at, type: :date indexes :created_at, type: :date
indexes :updated_at, type: :date indexes :updated_at, type: :date
indexes :state, type: :string indexes :state, type: :text
indexes :project_id, type: :integer indexes :project_id, type: :integer
indexes :author_id, type: :integer indexes :author_id, type: :integer
indexes :visibility_level, type: :integer indexes :visibility_level, type: :integer
......
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