-[Search through GitLab](user/search/index.md): Search for issues, merge requests, projects, groups, todos, and issues in Issue Boards.
-**(EES/EEP)**[Advanced Global Search](user/search/advanced_global_search.md): Leverage Elasticsearch for faster, more advanced code search across your entire GitLab instance.
-**(EES/EEP)**[Advanced Syntax Search](user/search/advanced_search_syntax.md): Use advanced queries for more targeted search results.
-[Snippets](user/snippets.md): Snippets allow you to create little bits of code.
-[Wikis](user/project/wiki/index.md): Enhance your repository documentation with built-in wikis.
-[GitLab Pages](user/project/pages/index.md): Build, test, and deploy your static website with GitLab Pages.
...
...
@@ -161,7 +163,7 @@ have access to GitLab administration tools and settings.
-[User cohorts](user/admin_area/user_cohorts.md) View user activity over time.
-[Web terminals](administration/integration/terminal.md): Provide terminal access to environments from within GitLab.
-**(EES/EEP)**[Audit logs and events](administration/audit_events.md): View the changes made within the GitLab server.
-**(EES/EEP)**[Elasticsearch](integration/elasticsearch.md): A flexible, scalable and powerful search service to keep GitLab's search fast when dealing with huge amount of data.
-**(EES/EEP)**[Elasticsearch](integration/elasticsearch.md): Enable Elasticsearch which powers GitLab's Advanced Global Search. Useful when you deal with a huge amount of data.
-**(EES/EEP)**[Email users](tools/email.md): Email GitLab users from within GitLab.
-**(EES/EEP)**[Limit project size](user/admin_area/settings/account_and_limit_settings.md): Set a hard limit for your repositories' size.
-**(EEP)**[Auditor users](administration/auditor_users.md): Users with read-only access to all projects, groups, and other resources on the GitLab instance.
> Elasticsearch was [Introduced][ee-109] in GitLab EE 8.4. Support for
> [Amazon Elasticsearch][aws-elasticsearch] was [introduced][ee-1305] in GitLab
> EE 9.0.
>
[Introduced][ee-109] in GitLab [Enterprise Edition Starter][ee] 8.4. Support
for [Amazon Elasticsearch][aws-elastic] was [introduced][ee-1305] in GitLab
[Enterprise Edition Starter][ee] 9.0.
## Why do you need this?
This document describes how to set up Elasticsearch with GitLab. Once enabled,
you'll have the benefit of fast search response times and the advantage of two
special searches:
[Elasticsearch] is a flexible, scalable and powerful search service that saves developers time. Instead of developers creating duplicate code and wasting time, they can now search for code within other teams that will help their own project.
## Who needs this?
1. My team uses a plugin to find code from different teams
2. Are developers from different teams creating the same code for their own projects?
3. Are you looking to enable innersourcing?
4. Do you you want to keep GitLab's search fast when dealing with huge amount of data?
If you answered yes to any of these, you should consider [enabling Elasticsearch](#enable-elasticsearch).
GitLab leverages the search capabilities of Elasticsearch and enables it when
searching in:
- GitLab application
- Issues
- Merge requests
- Milestones
- Notes
- Projects
- Repositories
- Snippets
- Wiki
Once the data is added to the database or repository and [Elasticsearch is
enabled in the admin area](#enable-elasticsearch) the search index will be
updated automatically. Elasticsearch can be installed on the same machine as
GitLab, or on a separate server, or you can use the [Amazon Elasticsearch][aws-elastic]
service.
-[Advance Global Search](../user/search/advanced_global_search.md)
Elasticsearch is _not_ included in the Omnibus packages. You will have to
install it yourself whether you are using the Omnibus package or installed
GitLab from source. Providing detailed information on installing Elasticsearch
is out of the scope of this document.
Once the data is added to the database or repository and [Elasticsearch is
enabled in the admin area](#enable-elasticsearch) the search index will be
updated automatically. Elasticsearch can be installed on the same machine as
GitLab, or on a separate server, or you can use the [Amazon Elasticsearch][aws-elastic]
service.
You can follow the steps as described in the [official web site][install] or
use the packages that are available for your OS.
## Enabling Elasticsearch
## Enable Elasticsearch
In order to enable Elasticsearch you need to have access to the server that GitLab is hosted on, and an administrator account on your GitLab instance. Go to **Admin > Settings** and find the "Elasticsearch" section.
In order to enable Elasticsearch, you need to have admin access. Go to
**Admin > Settings** and find the "Elasticsearch" section.
The following Elasticsearch settings are available:
...
...
@@ -70,7 +53,16 @@ The following Elasticsearch settings are available:
Disabling the Elasticsearch integration is as easy as unchecking `Search with Elasticsearch enabled` and `Elasticsearch indexing` in **Admin > Settings**.
## Special recommendations
Here are some tips to use Elasticsearch with GitLab more efficiently.
### Indexing large repositories
Indexing large Git repositories can take a while. To speed up the process, you
...
...
@@ -280,16 +265,21 @@ To minimize downtime of the search feature we recommend the following:
repositories and commits that are already indexed, so it will be much
shorter than the first run.
## Troubleshooting
### Exception "Can't specify parent if no parent field has been configured"
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
exception in lots of different cases:
-**I indexed all the repositories but I can't find anything**
"reason": "Can't specify parent if no parent field has been configured"
},
"status": 400
}):
```
}):
```
This is because we changed the index mapping in GitLab 8.12 and the old indexes should be removed and built from scratch again,
see details in the [8-11-to-8-12 update guide](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/doc/update/8.11-to-8.12.md#11-elasticsearch-index-update-if-you-currently-use-elasticsearch).
This is because we changed the index mapping in GitLab 8.12 and the old indexes should be removed and built from scratch again,
see details in the [8-11-to-8-12 update guide](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/doc/update/8.11-to-8.12.md#11-elasticsearch-index-update-if-you-currently-use-elasticsearch).
If you have this exception (just like in the case above but the actual message is different) please check if you have the correct Elasticsearch version and you met the other [requirements](#requirements).
There is also an easy way to check it automatically with `sudo gitlab-rake gitlab:check` command.
If you have this exception (just like in the case above but the actual message is different) please check if you have the correct Elasticsearch version and you met the other [requirements](#requirements).
There is also an easy way to check it automatically with `sudo gitlab-rake gitlab:check` command.