From aa41786b2e36a9e85f6973eecd68e6fc9f7f6134 Mon Sep 17 00:00:00 2001
From: Alvin Gounder <agounder@gitlab.com>
Date: Wed, 26 Feb 2025 12:45:25 +0000
Subject: [PATCH] Add more indexing details to Zoekt docs

---
 doc/integration/exact_code_search/zoekt.md | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/doc/integration/exact_code_search/zoekt.md b/doc/integration/exact_code_search/zoekt.md
index f0e280f1d3c4c..97879b926accc 100644
--- a/doc/integration/exact_code_search/zoekt.md
+++ b/doc/integration/exact_code_search/zoekt.md
@@ -65,6 +65,21 @@ To enable [exact code search](../../user/search/exact_code_search.md) in GitLab:
 1. Select the **Enable indexing for exact code search** and **Enable exact code search** checkboxes.
 1. Select **Save changes**.
 
+## Check indexing status
+
+Prerequisites:
+
+- You must have administrator access to the instance.
+
+Indexing performance depends on the CPU and memory limits on the Zoekt indexer nodes.
+To check indexing status, in the Rails console, run the following command:
+
+```ruby
+Search::Zoekt::Index.group(:state).count
+Search::Zoekt::Repository.group(:state).count
+Search::Zoekt::Task.group(:state).count
+```
+
 ## Delete offline nodes automatically
 
 Prerequisites:
@@ -97,6 +112,13 @@ To index all root namespaces automatically:
 1. Select the **Index root namespaces automatically** checkbox.
 1. Select **Save changes**.
 
+When you enable this setting, GitLab creates indexing tasks for all projects in:
+
+- All groups and subgroups
+- Any new root namespace
+
+After a project is indexed, GitLab creates only incremental indexing when a repository change is detected.
+
 When you disable this setting:
 
 - Existing root namespaces remain indexed.
-- 
GitLab