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
9c411756
Commit
9c411756
authored
May 06, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: Add more rake task
parent
1921c963
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
CHANGELOG-EE
CHANGELOG-EE
+2
-0
lib/tasks/gitlab/elastic.rake
lib/tasks/gitlab/elastic.rake
+34
-0
No files found.
CHANGELOG-EE
View file @
9c411756
...
...
@@ -4,6 +4,8 @@ v 8.8.0 (unreleased)
- [Elastic] Database indexer prints its status
- [Elastic][Fix] Database indexer skips projects with invalid HEAD reference
- [Elastic] More efficient snippets search
- [Elastic] Add rake task for removing all indexes
- [Elastic] Add rake task for clearing indexing status
- Set KRB5 as default clone protocol when Kerberos is enabled and user is logged in (Borja Aparicio)
v 8.7.2
...
...
lib/tasks/gitlab/elastic.rake
View file @
9c411756
...
...
@@ -103,11 +103,15 @@ namespace :gitlab do
klass
=
model_name
.
constantize
klass
.
__elasticsearch__
.
create_index!
force:
true
print
"Reindexing
#{
klass
}
records... "
if
klass
==
Note
Note
.
searchable
.
import
else
klass
.
import
end
puts
"done"
.
green
end
desc
"GitLab | Create empty Elasticsearch indexes"
...
...
@@ -122,7 +126,37 @@ namespace :gitlab do
ProjectWiki
,
Repository
].
each
do
|
klass
|
print
"Creating index for
#{
klass
}
... "
klass
.
__elasticsearch__
.
create_index!
puts
"done"
.
green
end
end
desc
"GitLab | Clear Elasticsearch indexing status"
task
clear_index_status: :environment
do
IndexStatus
.
destroy_all
puts
"Done"
.
green
end
desc
"GitLab | Delete Elasticsearch indexes"
task
delete_indexes: :environment
do
[
Project
,
Issue
,
MergeRequest
,
Snippet
,
Note
,
Milestone
,
ProjectWiki
,
Repository
].
each
do
|
klass
|
print
"Delete index for
#{
klass
}
... "
klass
.
__elasticsearch__
.
delete_index!
puts
"done"
.
green
end
end
...
...
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