Commit 09339a55 authored by Evan Read's avatar Evan Read

Merge branch 'docs-11.5-es-refresh' into 'master'

Docs - Add 11.5 ES reindex info

See merge request gitlab-org/gitlab-ee!8662
parents edee6773 3dcea4fa
...@@ -58,7 +58,7 @@ installed before running `make`. ...@@ -58,7 +58,7 @@ installed before running `make`.
To install on Debian or Ubutu, run: To install on Debian or Ubutu, run:
``` ```sh
sudo apt install libicu-dev sudo apt install libicu-dev
``` ```
...@@ -66,7 +66,7 @@ sudo apt install libicu-dev ...@@ -66,7 +66,7 @@ sudo apt install libicu-dev
To install on macOS, run: To install on macOS, run:
``` ```sh
brew install icu4c brew install icu4c
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH" export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH"
``` ```
...@@ -75,7 +75,7 @@ export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH" ...@@ -75,7 +75,7 @@ export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH"
To build and install the indexer, run: To build and install the indexer, run:
``` ```sh
make make
sudo make install sudo make install
``` ```
...@@ -87,7 +87,7 @@ Please remember to pass the `-E` flag to `sudo` if you do so. ...@@ -87,7 +87,7 @@ Please remember to pass the `-E` flag to `sudo` if you do so.
Example: Example:
``` ```sh
PREFIX=/usr sudo -E make install PREFIX=/usr sudo -E make install
``` ```
...@@ -138,7 +138,7 @@ To disable the Elasticsearch integration: ...@@ -138,7 +138,7 @@ To disable the Elasticsearch integration:
Configure Elasticsearch's host and port in **Admin > Settings**. Then create empty indexes using one of the following commands: Configure Elasticsearch's host and port in **Admin > Settings**. Then create empty indexes using one of the following commands:
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:create_empty_index sudo gitlab-rake gitlab:elastic:create_empty_index
...@@ -148,7 +148,7 @@ bundle exec rake gitlab:elastic:create_empty_index RAILS_ENV=production ...@@ -148,7 +148,7 @@ bundle exec rake gitlab:elastic:create_empty_index RAILS_ENV=production
Then enable Elasticsearch indexing and run repository indexing tasks: Then enable Elasticsearch indexing and run repository indexing tasks:
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:index sudo gitlab-rake gitlab:elastic:index
...@@ -162,7 +162,7 @@ Enable Elasticsearch search. ...@@ -162,7 +162,7 @@ Enable Elasticsearch search.
Configure Elasticsearch's host and port in **Admin > Settings**. Then create empty indexes using one of the following commands: Configure Elasticsearch's host and port in **Admin > Settings**. Then create empty indexes using one of the following commands:
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:create_empty_index sudo gitlab-rake gitlab:elastic:create_empty_index
...@@ -184,7 +184,7 @@ curl --request PUT localhost:9200/gitlab-production/_settings --data '{ ...@@ -184,7 +184,7 @@ curl --request PUT localhost:9200/gitlab-production/_settings --data '{
Then enable Elasticsearch indexing and run repository indexing tasks: Then enable Elasticsearch indexing and run repository indexing tasks:
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:index_repositories_async sudo gitlab-rake gitlab:elastic:index_repositories_async
...@@ -196,8 +196,7 @@ This enqueues a number of Sidekiq jobs to index your existing repositories. ...@@ -196,8 +196,7 @@ This enqueues a number of Sidekiq jobs to index your existing repositories.
You can view the jobs in the admin panel (they are placed in the `elastic_batch_project_indexer`) You can view the jobs in the admin panel (they are placed in the `elastic_batch_project_indexer`)
queue), or you can query indexing status using a rake task: queue), or you can query indexing status using a rake task:
```sh
```
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:index_repositories_status sudo gitlab-rake gitlab:elastic:index_repositories_status
...@@ -215,7 +214,7 @@ You can also run the initial indexing synchronously - this is most useful if ...@@ -215,7 +214,7 @@ You can also run the initial indexing synchronously - this is most useful if
you have a small number of projects, or need finer-grained control over indexing you have a small number of projects, or need finer-grained control over indexing
than Sidekiq permits: than Sidekiq permits:
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:index_repositories sudo gitlab-rake gitlab:elastic:index_repositories
...@@ -228,7 +227,7 @@ It might take a while depending on how big your Git repositories are. ...@@ -228,7 +227,7 @@ It might take a while depending on how big your Git repositories are.
If you want to run several tasks in parallel (probably in separate terminal If you want to run several tasks in parallel (probably in separate terminal
windows) you can provide the `ID_FROM` and `ID_TO` parameters: windows) you can provide the `ID_FROM` and `ID_TO` parameters:
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:index_repositories ID_FROM=1001 ID_TO=2000 sudo gitlab-rake gitlab:elastic:index_repositories ID_FROM=1001 ID_TO=2000
...@@ -239,7 +238,7 @@ bundle exec rake gitlab:elastic:index_repositories ID_FROM=1001 ID_TO=2000 RAILS ...@@ -239,7 +238,7 @@ bundle exec rake gitlab:elastic:index_repositories ID_FROM=1001 ID_TO=2000 RAILS
Where `ID_FROM` and `ID_TO` are project IDs. Both parameters are optional. Where `ID_FROM` and `ID_TO` are project IDs. Both parameters are optional.
As an example, if you have 3,000 repositories and you want to run three separate indexing tasks, you might run: As an example, if you have 3,000 repositories and you want to run three separate indexing tasks, you might run:
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:index_repositories ID_TO=1000 sudo gitlab-rake gitlab:elastic:index_repositories ID_TO=1000
sudo gitlab-rake gitlab:elastic:index_repositories ID_FROM=1001 ID_TO=2000 sudo gitlab-rake gitlab:elastic:index_repositories ID_FROM=1001 ID_TO=2000
...@@ -261,7 +260,7 @@ database, you can run the indexer with the special parameter `UPDATE_INDEX` and ...@@ -261,7 +260,7 @@ database, you can run the indexer with the special parameter `UPDATE_INDEX` and
it will check every project repository again to make sure that every commit in it will check every project repository again to make sure that every commit in
that repository is indexed, it can be useful in case if your index is outdated: that repository is indexed, it can be useful in case if your index is outdated:
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:index_repositories UPDATE_INDEX=true ID_TO=1000 sudo gitlab-rake gitlab:elastic:index_repositories UPDATE_INDEX=true ID_TO=1000
...@@ -275,7 +274,7 @@ start. ...@@ -275,7 +274,7 @@ start.
To index all wikis: To index all wikis:
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:index_wikis sudo gitlab-rake gitlab:elastic:index_wikis
...@@ -288,7 +287,7 @@ to limit a project set. ...@@ -288,7 +287,7 @@ to limit a project set.
Index all database entities (Keep in mind it can take a while so consider using `screen` or `tmux`): Index all database entities (Keep in mind it can take a while so consider using `screen` or `tmux`):
``` ```sh
# Omnibus installations # Omnibus installations
sudo gitlab-rake gitlab:elastic:index_database sudo gitlab-rake gitlab:elastic:index_database
...@@ -318,6 +317,12 @@ Enable Elasticsearch search in **Admin > Settings**. That's it. Enjoy it! ...@@ -318,6 +317,12 @@ Enable Elasticsearch search in **Admin > Settings**. That's it. Enjoy it!
Here are some common pitfalls and how to overcome them: Here are some common pitfalls and how to overcome them:
- **I updated GitLab and now I can't find anything**
We continuously make updates to our indexing strategies and aim to support
newer versions of Elasticsearch. When indexing changes are made, it may
be necessary for you to [reindex](#adding-gitlabs-data-to-the-elasticsearch-index) after updating GitLab.
- **I indexed all the repositories but I can't find anything** - **I indexed all the repositories but I can't find anything**
Make sure you indexed all the database data [as stated above](#adding-gitlab-data-to-the-elasticsearch-index). Make sure you indexed all the database data [as stated above](#adding-gitlab-data-to-the-elasticsearch-index).
...@@ -331,7 +336,7 @@ Here are some common pitfalls and how to overcome them: ...@@ -331,7 +336,7 @@ Here are some common pitfalls and how to overcome them:
If you enabled Elasticsearch before GitLab 8.12 and have not rebuilt indexes you will get If you enabled Elasticsearch before GitLab 8.12 and have not rebuilt indexes you will get
exception in lots of different cases: exception in lots of different cases:
``` ```text
Elasticsearch::Transport::Transport::Errors::BadRequest([400] { Elasticsearch::Transport::Transport::Errors::BadRequest([400] {
"error": { "error": {
"root_cause": [{ "root_cause": [{
...@@ -355,7 +360,7 @@ Here are some common pitfalls and how to overcome them: ...@@ -355,7 +360,7 @@ Here are some common pitfalls and how to overcome them:
- Exception `Elasticsearch::Transport::Transport::Errors::RequestEntityTooLarge` - Exception `Elasticsearch::Transport::Transport::Errors::RequestEntityTooLarge`
``` ```text
[413] {"Message":"Request size exceeded 10485760 bytes"} [413] {"Message":"Request size exceeded 10485760 bytes"}
``` ```
......
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