Commit 55798eff authored by Ilia Kosenko's avatar Ilia Kosenko

Merge branch 'docs_update_esintegration_vlads' into 'master'

Update ES Integration troubleshooting section with more context

See merge request gitlab-org/gitlab!42805
parents 0efd0a0b 93a364fd
...@@ -730,13 +730,11 @@ Here are some common pitfalls and how to overcome them: ...@@ -730,13 +730,11 @@ Here are some common pitfalls and how to overcome them:
newer versions of Elasticsearch. When indexing changes are made, it may newer versions of Elasticsearch. When indexing changes are made, it may
be necessary for you to [reindex](#zero-downtime-reindexing) after updating GitLab. be necessary for you to [reindex](#zero-downtime-reindexing) after updating GitLab.
- **I indexed all the repositories but I can't find anything** - **I indexed all the repositories but I can't get any hits for my search term in the UI**
Make sure you indexed all the database data [as stated above](#enabling-elasticsearch). Make sure you indexed all the database data [as stated above](#enabling-elasticsearch).
Beyond that, check via the [Elasticsearch Search API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html) to see if the data shows up on the Elasticsearch side. If there aren't any results (hits) in the UI search, check if you are seeing the same results via the rails console (`sudo gitlab-rails console`):
If it shows up via the [Elasticsearch Search API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html), check that it shows up via the rails console (`sudo gitlab-rails console`):
```ruby ```ruby
u = User.find_by_username('your-username') u = User.find_by_username('your-username')
...@@ -744,6 +742,16 @@ Here are some common pitfalls and how to overcome them: ...@@ -744,6 +742,16 @@ Here are some common pitfalls and how to overcome them:
pp s.search_objects.to_a pp s.search_objects.to_a
``` ```
Beyond that, check via the [Elasticsearch Search API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html) to see if the data shows up on the Elasticsearch side:
```shell
curl --request GET <elasticsearch_server_ip>:9200/gitlab-production/_search?q=<search_term>
```
More [complex Elasticsearch API calls](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html) are also possible.
It is important to understand at which level the problem is manifesting (UI, Rails code, Elasticsearch side) to be able to [troubleshoot further](../administration/troubleshooting/elasticsearch.md#search-results-workflow).
NOTE: **Note:** NOTE: **Note:**
The above instructions are not to be used for scenarios that only index a [subset of namespaces](#limiting-namespaces-and-projects). The above instructions are not to be used for scenarios that only index a [subset of namespaces](#limiting-namespaces-and-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