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

ES: formatting index mapping

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