From a92d299f658e79180fe0bcb36fb56462add1afcc Mon Sep 17 00:00:00 2001 From: ralf401 Date: Thu, 14 Aug 2025 15:28:44 +0200 Subject: [PATCH] Fixes #691 - 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 d110fc6e..00c774d5 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 558e570d..5297fc61 100644 --- a/install/elasticsearch.rst +++ b/install/elasticsearch.rst @@ -226,11 +226,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. .. code-block:: sh @@ -240,6 +241,14 @@ Build/rebuild the searchindex # rebuilding the searchindex, as in the following example with 8 cores: $ 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 -----------------