Commit 6293a227 authored by Valery Sizov's avatar Valery Sizov

ES: formatting index mapping

parent 5c6312f3
...@@ -5,17 +5,23 @@ module IssuesSearch ...@@ -5,17 +5,23 @@ module IssuesSearch
include ApplicationSearch include ApplicationSearch
mappings do mappings do
indexes :id, type: :integer, index: :not_analyzed indexes :id, type: :integer
indexes :iid, type: :integer, index: :not_analyzed indexes :iid, type: :integer, index: :not_analyzed
indexes :title, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer indexes :title, type: :string,
indexes :description, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :description, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
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: :string
indexes :project_id, type: :integer, index: :not_analyzed indexes :project_id, type: :integer
indexes :author_id, type: :integer, index: :not_analyzed indexes :author_id, type: :integer
indexes :project, type: :nested indexes :project, type: :nested
indexes :author, type: :nested indexes :author, type: :nested
......
...@@ -5,21 +5,33 @@ module MergeRequestsSearch ...@@ -5,21 +5,33 @@ module MergeRequestsSearch
include ApplicationSearch include ApplicationSearch
mappings do mappings do
indexes :id, type: :integer, index: :not_analyzed indexes :id, type: :integer
indexes :iid, type: :integer, index: :not_analyzed indexes :iid, type: :integer
indexes :target_branch, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer indexes :target_branch, type: :string,
indexes :source_branch, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer index_options: 'offsets',
indexes :title, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer search_analyzer: :search_analyzer,
indexes :description, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer analyzer: :my_analyzer
indexes :source_branch, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :title, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :description, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
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: :string
indexes :merge_status, type: :string indexes :merge_status, type: :string
indexes :source_project_id, type: :integer, index: :not_analyzed indexes :source_project_id, type: :integer
indexes :target_project_id, type: :integer, index: :not_analyzed indexes :target_project_id, type: :integer
indexes :author_id, type: :integer, index: :not_analyzed indexes :author_id, type: :integer
indexes :source_project, type: :nested indexes :source_project, type: :nested
indexes :target_project, type: :nested indexes :target_project, type: :nested
......
...@@ -6,9 +6,15 @@ module MilestonesSearch ...@@ -6,9 +6,15 @@ module MilestonesSearch
mappings do mappings do
indexes :id, type: :integer indexes :id, type: :integer
indexes :title, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer indexes :title, type: :string,
indexes :description, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer index_options: 'offsets',
indexes :project_id, type: :integer, index: :not_analyzed search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :description, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :project_id, type: :integer
indexes :created_at, type: :date indexes :created_at, type: :date
indexes :updated_at_sort, type: :string, index: 'not_analyzed' indexes :updated_at_sort, type: :string, index: 'not_analyzed'
......
...@@ -6,8 +6,11 @@ module NotesSearch ...@@ -6,8 +6,11 @@ module NotesSearch
mappings do mappings do
indexes :id, type: :integer indexes :id, type: :integer
indexes :note, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer indexes :note, type: :string,
indexes :project_id, type: :integer, index: :not_analyzed index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :project_id, type: :integer
indexes :created_at, type: :date indexes :created_at, type: :date
indexes :updated_at_sort, type: :string, index: 'not_analyzed' indexes :updated_at_sort, type: :string, index: 'not_analyzed'
......
...@@ -5,19 +5,34 @@ module ProjectsSearch ...@@ -5,19 +5,34 @@ module ProjectsSearch
include ApplicationSearch include ApplicationSearch
mappings do mappings do
indexes :id, type: :integer, index: 'not_analyzed' indexes :id, type: :integer
indexes :name, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer indexes :name, type: :string,
indexes :path, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer index_options: 'offsets',
indexes :name_with_namespace, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer search_analyzer: :search_analyzer,
indexes :path_with_namespace, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer analyzer: :my_analyzer
indexes :description, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer indexes :path, type: :string,
index_options: 'offsets',
indexes :namespace_id, type: :integer, index: 'not_analyzed' search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :name_with_namespace, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :path_with_namespace, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :description, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :namespace_id, type: :integer
indexes :created_at, type: :date indexes :created_at, type: :date
indexes :archived, type: :boolean indexes :archived, type: :boolean
indexes :visibility_level, type: :integer, index: 'not_analyzed' indexes :visibility_level, type: :integer
indexes :last_activity_at, type: :date indexes :last_activity_at, type: :date
indexes :last_pushed_at, type: :date indexes :last_pushed_at, type: :date
end end
......
...@@ -5,17 +5,26 @@ module SnippetsSearch ...@@ -5,17 +5,26 @@ module SnippetsSearch
include ApplicationSearch include ApplicationSearch
mappings do mappings do
indexes :id, type: :integer, index: :not_analyzed indexes :id, type: :integer
indexes :title, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer indexes :title, type: :string,
indexes :file_name, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer index_options: 'offsets',
indexes :content, type: :string, index_options: 'offsets', search_analyzer: :search_analyzer, analyzer: :my_analyzer search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :file_name, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
indexes :content, type: :string,
index_options: 'offsets',
search_analyzer: :search_analyzer,
analyzer: :my_analyzer
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: :string
indexes :project_id, type: :integer, index: :not_analyzed indexes :project_id, type: :integer
indexes :author_id, type: :integer, index: :not_analyzed indexes :author_id, type: :integer
indexes :project, type: :nested indexes :project, type: :nested
indexes :author, type: :nested indexes :author, type: :nested
......
...@@ -8,11 +8,11 @@ module ApplicationSettingsHelper ...@@ -8,11 +8,11 @@ module ApplicationSettingsHelper
end end
def signup_enabled? def signup_enabled?
current_application_settings.signup_enabled? current_application_settings.signup_enabled
end end
def signin_enabled? def signin_enabled?
current_application_settings.signin_enabled? current_application_settings.signin_enabled
end end
def extra_sign_in_text def extra_sign_in_text
......
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