Commit 8a69a19f authored by Valery Sizov's avatar Valery Sizov

Merge branch 'es_update' of gitlab.com:gitlab-org/gitlab-ee into ee_master

parents efd39069 726e1637
...@@ -3,6 +3,8 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -3,6 +3,8 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.6.0 (unreleased) v 8.6.0 (unreleased)
- Improve weight filter for issues - Improve weight filter for issues
- [Elastic] Add elastic checker to gitlab:check - [Elastic] Add elastic checker to gitlab:check
v 8.6.0
- [Elastic] Added UPDATE_INDEX option to rake task
v 8.5.1 v 8.5.1
- Fix adding pages domain to projects in groups - Fix adding pages domain to projects in groups
......
...@@ -134,6 +134,15 @@ ID_FROM=1001 ID_TO=2000 sudo gitlab-rake gitlab:elastic:index_repositories ...@@ -134,6 +134,15 @@ ID_FROM=1001 ID_TO=2000 sudo gitlab-rake gitlab:elastic:index_repositories
ID_FROM=2001 sudo gitlab-rake gitlab:elastic:index_repositories ID_FROM=2001 sudo gitlab-rake gitlab:elastic:index_repositories
``` ```
If you need to update any outdated indexes, you can use
the `UPDATE_INDEX` parameter:
```
UPDATE_INDEX=true ID_TO=1000 sudo gitlab-rake gitlab:elastic:index_repositories
```
Keep in mind that it will scan all repositories to make sure that last commit is already indexed.
To index all wikis: To index all wikis:
``` ```
......
...@@ -4,12 +4,12 @@ namespace :gitlab do ...@@ -4,12 +4,12 @@ namespace :gitlab do
task index_repositories: :environment do task index_repositories: :environment do
Repository.__elasticsearch__.create_index! Repository.__elasticsearch__.create_index!
projects = if ENV['NOT_INDEXED_ONLY'] projects = if ENV['UPDATE_INDEX']
Project
else
Project.includes(:index_status). Project.includes(:index_status).
where("index_statuses.id IS NULL"). where("index_statuses.id IS NULL").
references(:index_statuses) references(:index_statuses)
else
Project
end end
projects = apply_project_filters(projects) projects = apply_project_filters(projects)
......
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