Skip to content

Commit 0a45373

Browse files
authored
Fixes #691 - Added command for adding specific ES index
1 parent cb4b797 commit 0a45373

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

admin/console.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ It allows you to run several commands inside it.
7575

7676
.. code-block:: sh
7777
78-
$ $ zammad run rails c
78+
$ zammad run rails c
7979
8080
.. tab:: Source/Development Installation
8181

install/elasticsearch.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,12 @@ Build/rebuild the searchindex
284284
.. hint::
285285
- The rebuild may take many hours or even days, if a lot of data is
286286
already present in a productive environment. However, you can safely
287-
run this during operating times without the risk of loosing data. As a
287+
run this during operating times without the risk of losing data. As a
288288
downside, it could lead to reduced performance and that some data may
289289
not be shown in search results.
290290
- Consider specifying a number of CPU cores to be used for the rebuild
291291
(see example below).
292+
- If you just want to add a missing index, use the third command below.
292293

293294
Without specifying CPU cores:
294295

@@ -302,6 +303,14 @@ Build/rebuild the searchindex
302303
303304
$ sudo zammad run rake zammad:searchindex:rebuild[8]
304305
306+
Add a specific index with the command below. Replace ``Ticket`` with the one
307+
you want to add. If your database already holds data which has to be indexed,
308+
additionally use the second command:
309+
310+
.. code-block:: sh
311+
312+
$ zammad run rails r "SearchIndexBackend.create_object_index('Ticket')"
313+
$ zammad run rails r "Ticket.search_index_reload"
305314
306315
Optional settings
307316
-----------------

0 commit comments

Comments
 (0)