From 098eb7b6b3db9624ce76f8e3361bbe7171f5bf21 Mon Sep 17 00:00:00 2001 From: Ralf Schmid Date: Thu, 14 Aug 2025 15:02:43 +0200 Subject: [PATCH] Added command for adding specific ES index --- admin/console.rst | 2 +- install/elasticsearch.rst | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/admin/console.rst b/admin/console.rst index 5e1900c0..52939574 100644 --- a/admin/console.rst +++ b/admin/console.rst @@ -75,7 +75,7 @@ It allows you to run several commands inside it. .. code-block:: sh - $ $ zammad run rails c + $ zammad run rails c .. tab:: Source/Development Installation diff --git a/install/elasticsearch.rst b/install/elasticsearch.rst index c8060bff..efb3295a 100644 --- a/install/elasticsearch.rst +++ b/install/elasticsearch.rst @@ -284,11 +284,12 @@ Build/rebuild the searchindex .. hint:: - The rebuild may take many hours or even days, if a lot of data is already present in a productive environment. However, you can safely - run this during operating times without the risk of loosing data. As a + run this during operating times without the risk of losing data. As a downside, it could lead to reduced performance and that some data may not be shown in search results. - Consider specifying a number of CPU cores to be used for the rebuild (see example below). + - If you just want to add a missing index, use the third command below. Without specifying CPU cores: @@ -302,6 +303,14 @@ Build/rebuild the searchindex $ sudo zammad run rake zammad:searchindex:rebuild[8] + Add a specific index with the command below. Replace ``Ticket`` with the one + you want to add. If your database already holds data which has to be indexed, + additionally use the second command: + + .. code-block:: sh + + $ zammad run rails r "SearchIndexBackend.create_object_index('Ticket')" + $ zammad run rails r "Ticket.search_index_reload" Optional settings -----------------