Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6293a227
Commit
6293a227
authored
Jan 19, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: formatting index mapping
parent
5c6312f3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
37 deletions
+88
-37
app/elastic/issues_search.rb
app/elastic/issues_search.rb
+11
-5
app/elastic/merge_requests_search.rb
app/elastic/merge_requests_search.rb
+21
-9
app/elastic/milestones_search.rb
app/elastic/milestones_search.rb
+9
-3
app/elastic/notes_search.rb
app/elastic/notes_search.rb
+5
-2
app/elastic/projects_search.rb
app/elastic/projects_search.rb
+25
-10
app/elastic/snippets_search.rb
app/elastic/snippets_search.rb
+15
-6
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+2
-2
No files found.
app/elastic/issues_search.rb
View file @
6293a227
...
...
@@ -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
...
...
app/elastic/merge_requests_search.rb
View file @
6293a227
...
...
@@ -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
...
...
app/elastic/milestones_search.rb
View file @
6293a227
...
...
@@ -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'
...
...
app/elastic/notes_search.rb
View file @
6293a227
...
...
@@ -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'
...
...
app/elastic/projects_search.rb
View file @
6293a227
...
...
@@ -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
...
...
app/elastic/snippets_search.rb
View file @
6293a227
...
...
@@ -5,17 +5,26 @@ module SnippetsSearch
include
ApplicationSearch
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
: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
: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
...
...
app/helpers/application_settings_helper.rb
View file @
6293a227
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment