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
ad2b85c4
Commit
ad2b85c4
authored
Jan 19, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: one more fix
parent
ce18fdd9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
app/elastic/application_search.rb
app/elastic/application_search.rb
+2
-1
app/elastic/merge_requests_search.rb
app/elastic/merge_requests_search.rb
+0
-1
lib/tasks/gitlab/elastic.rake
lib/tasks/gitlab/elastic.rake
+3
-3
No files found.
app/elastic/application_search.rb
View file @
ad2b85c4
...
@@ -16,10 +16,11 @@ module ApplicationSearch
...
@@ -16,10 +16,11 @@ module ApplicationSearch
tokenizer:
"standard"
,
tokenizer:
"standard"
,
filter:
[
"standard"
,
"lowercase"
,
"my_stemmer"
]
filter:
[
"standard"
,
"lowercase"
,
"my_stemmer"
]
}
}
},
filter:
{
filter:
{
my_stemmer:
{
my_stemmer:
{
type:
"stemmer"
,
type:
"stemmer"
,
name:
"light_
german
"
name:
"light_
english
"
}
}
}
}
}
}
...
...
app/elastic/merge_requests_search.rb
View file @
ad2b85c4
...
@@ -10,7 +10,6 @@ module MergeRequestsSearch
...
@@ -10,7 +10,6 @@ module MergeRequestsSearch
indexes
:iid
,
type: :integer
indexes
:iid
,
type: :integer
indexes
:target_branch
,
type: :string
,
indexes
:target_branch
,
type: :string
,
index_options:
'offsets'
index_options:
'offsets'
analyzer: :my_analyzer
indexes
:source_branch
,
type: :string
,
indexes
:source_branch
,
type: :string
,
index_options:
'offsets'
index_options:
'offsets'
indexes
:title
,
type: :string
,
indexes
:title
,
type: :string
,
...
...
lib/tasks/gitlab/elastic.rake
View file @
ad2b85c4
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:elastic
do
namespace
:elastic
do
desc
"Indexing repositories"
desc
"Indexing repositories"
task
index_repositor
y
: :environment
do
task
index_repositor
ies
: :environment
do
Repository
.
import
Repository
.
import
end
end
desc
"Indexing all wikis"
desc
"Indexing all wikis"
task
index_wiki: :environment
do
task
index_wiki
s
: :environment
do
ProjectWiki
.
import
ProjectWiki
.
import
end
end
desc
"Create indexes in the Elasticsearch from database records"
desc
"Create indexes in the Elasticsearch from database records"
task
create_index
: :environment
do
task
index_database
: :environment
do
[
Project
,
Issue
,
MergeRequest
,
Snippet
,
Note
,
Milestone
].
each
do
|
klass
|
[
Project
,
Issue
,
MergeRequest
,
Snippet
,
Note
,
Milestone
].
each
do
|
klass
|
klass
.
__elasticsearch__
.
create_index!
klass
.
__elasticsearch__
.
create_index!
klass
.
import
klass
.
import
...
...
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