Skip to content

Commit e5f87cb

Browse files
authored
Fixes #691 - Added command for adding specific ES index
1 parent 57cd748 commit e5f87cb

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
@@ -226,11 +226,12 @@ Build/rebuild the searchindex
226226
.. hint::
227227
- The rebuild may take many hours or even days, if a lot of data is
228228
already present in a productive environment. However, you can safely
229-
run this during operating times without the risk of loosing data. As a
229+
run this during operating times without the risk of losing data. As a
230230
downside, it could lead to reduced performance and that some data may
231231
not be shown in search results.
232232
- Consider specifying a number of CPU cores to be used for the rebuild
233233
(see example below).
234+
- If you just want to add a missing index, use the third command below.
234235

235236
.. code-block:: sh
236237
@@ -240,6 +241,14 @@ Build/rebuild the searchindex
240241
# rebuilding the searchindex, as in the following example with 8 cores:
241242
$ sudo zammad run rake zammad:searchindex:rebuild[8]
242243
244+
Add a specific index with the command below. Replace ``Ticket`` with the one
245+
you want to add. If your database already holds data which has to be indexed,
246+
additionally use the second command:
247+
248+
.. code-block:: sh
249+
250+
$ zammad run rails r "SearchIndexBackend.create_object_index('Ticket')"
251+
$ zammad run rails r "Ticket.search_index_reload"
243252
244253
Optional settings
245254
-----------------

0 commit comments

Comments
 (0)