Commit f33f8847 authored by Nick Thomas's avatar Nick Thomas

Merge branch '28085-index-options-tuning' into 'master'

Use less expensive index_options

Closes #28085

See merge request gitlab-org/gitlab!25992
parents 61e40d51 29367e67
---
title: Optimize storage usage for newly created ES indices
merge_request: 25992
author:
type: other
...@@ -122,9 +122,9 @@ module Elastic ...@@ -122,9 +122,9 @@ module Elastic
indexes :iid, type: :integer indexes :iid, type: :integer
indexes :title, type: :text, indexes :title, type: :text,
index_options: 'offsets' index_options: 'docs'
indexes :description, type: :text, indexes :description, type: :text,
index_options: 'offsets' index_options: 'positions'
indexes :state, type: :text indexes :state, type: :text
indexes :project_id, type: :integer indexes :project_id, type: :integer
indexes :author_id, type: :integer indexes :author_id, type: :integer
...@@ -144,16 +144,16 @@ module Elastic ...@@ -144,16 +144,16 @@ module Elastic
### MERGE REQUESTS ### MERGE REQUESTS
indexes :target_branch, type: :text, indexes :target_branch, type: :text,
index_options: 'offsets' index_options: 'docs'
indexes :source_branch, type: :text, indexes :source_branch, type: :text,
index_options: 'offsets' index_options: 'docs'
indexes :merge_status, type: :text 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
### NOTES ### NOTES
indexes :note, type: :text, indexes :note, type: :text,
index_options: 'offsets' index_options: 'positions'
indexes :issue do indexes :issue do
indexes :assignee_id, type: :integer indexes :assignee_id, type: :integer
...@@ -168,14 +168,14 @@ module Elastic ...@@ -168,14 +168,14 @@ module Elastic
### PROJECTS ### PROJECTS
indexes :name, type: :text, indexes :name, type: :text,
index_options: 'offsets' index_options: 'docs'
indexes :path, type: :text, indexes :path, type: :text,
index_options: 'offsets' index_options: 'docs'
indexes :name_with_namespace, type: :text, indexes :name_with_namespace, type: :text,
index_options: 'offsets', index_options: 'docs',
analyzer: :my_ngram_analyzer analyzer: :my_ngram_analyzer
indexes :path_with_namespace, type: :text, indexes :path_with_namespace, type: :text,
index_options: 'offsets' index_options: 'positions'
indexes :namespace_id, type: :integer indexes :namespace_id, type: :integer
indexes :archived, type: :boolean indexes :archived, type: :boolean
...@@ -190,23 +190,23 @@ module Elastic ...@@ -190,23 +190,23 @@ module Elastic
### SNIPPETS ### SNIPPETS
indexes :file_name, type: :text, indexes :file_name, type: :text,
index_options: 'offsets' index_options: 'docs'
indexes :content, type: :text, indexes :content, type: :text,
index_options: 'offsets' index_options: 'positions'
### REPOSITORIES ### REPOSITORIES
indexes :blob do indexes :blob do
indexes :type, type: :keyword indexes :type, type: :keyword
indexes :id, type: :text, indexes :id, type: :text,
index_options: 'offsets', index_options: 'docs',
analyzer: :sha_analyzer analyzer: :sha_analyzer
indexes :rid, type: :keyword indexes :rid, type: :keyword
indexes :oid, type: :text, indexes :oid, type: :text,
index_options: 'offsets', index_options: 'docs',
analyzer: :sha_analyzer analyzer: :sha_analyzer
indexes :commit_sha, type: :text, indexes :commit_sha, type: :text,
index_options: 'offsets', index_options: 'docs',
analyzer: :sha_analyzer analyzer: :sha_analyzer
indexes :path, type: :text, indexes :path, type: :text,
analyzer: :path_analyzer analyzer: :path_analyzer
...@@ -214,7 +214,7 @@ module Elastic ...@@ -214,7 +214,7 @@ module Elastic
analyzer: :code_analyzer, analyzer: :code_analyzer,
search_analyzer: :code_search_analyzer search_analyzer: :code_search_analyzer
indexes :content, type: :text, indexes :content, type: :text,
index_options: 'offsets', index_options: 'positions',
analyzer: :code_analyzer, analyzer: :code_analyzer,
search_analyzer: :code_search_analyzer search_analyzer: :code_search_analyzer
indexes :language, type: :keyword indexes :language, type: :keyword
...@@ -224,26 +224,26 @@ module Elastic ...@@ -224,26 +224,26 @@ module Elastic
indexes :type, type: :keyword indexes :type, type: :keyword
indexes :id, type: :text, indexes :id, type: :text,
index_options: 'offsets', index_options: 'docs',
analyzer: :sha_analyzer analyzer: :sha_analyzer
indexes :rid, type: :keyword indexes :rid, type: :keyword
indexes :sha, type: :text, indexes :sha, type: :text,
index_options: 'offsets', index_options: 'docs',
analyzer: :sha_analyzer analyzer: :sha_analyzer
indexes :author do indexes :author do
indexes :name, type: :text, index_options: 'offsets' indexes :name, type: :text, index_options: 'docs'
indexes :email, type: :text, index_options: 'offsets' indexes :email, type: :text, index_options: 'docs'
indexes :time, type: :date, format: :basic_date_time_no_millis indexes :time, type: :date, format: :basic_date_time_no_millis
end end
indexes :committer do indexes :committer do
indexes :name, type: :text, index_options: 'offsets' indexes :name, type: :text, index_options: 'docs'
indexes :email, type: :text, index_options: 'offsets' indexes :email, type: :text, index_options: 'docs'
indexes :time, type: :date, format: :basic_date_time_no_millis indexes :time, type: :date, format: :basic_date_time_no_millis
end end
indexes :message, type: :text, index_options: 'offsets' indexes :message, type: :text, index_options: 'positions'
end end
end end
end end
......
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