From 360a02eac03bb8bf25f1f16968acb053f06c5bef Mon Sep 17 00:00:00 2001 From: Jan Siero Date: Sat, 2 Dec 2023 12:29:15 +0100 Subject: [PATCH 1/5] Add scheduled task configuration for Elasticsearch As written here the scheduled task configuration for elastic search is missing in the documentation: https://community.suitecrm.com/t/elastic-search-cron-job/67205/8 --- .../search/elasticsearch/Set up SuiteCRM.adoc | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc index 67f3f8e77..088a9bb6b 100644 --- a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc +++ b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc @@ -10,7 +10,9 @@ This enhancement is only available in SuiteCRM from version 7.11 onwards. :imagesdir: /images/en/admin/ElasticSearch :experimental: -Go to to admin panel, scroll down to the Search settings, and open the Elasticsearch setting page. +== Configure the Elasticsearch connection + +Go to the admin panel, scroll down to the Search settings, and open the Elasticsearch setting page. Enable Elasticsearch from the checkbox and fill the host, user and password fields. Simply leave user and password blank if you have anonymous access enabled. @@ -24,7 +26,23 @@ You can use btn:[Test connection] to see if the current configuration is working Once you are satisfied with your settings hit btn:[Save]. -After having saved, perform a full indexing by pressing btn:[Schedule full indexing]. +== Setup the scheduled task + +Go to the admin panel, open Scheduler. On the side panel click "Create Scheduler". +In the Jobs dropdown, select "Elasticsearch indexer". In Job Name, enter a self chosen title, for example "Elasticsearch", hit btn:[Save]. + +As AOD Lucene Indexing will no longer be used, edit the following entries in the Scheduler list, set status to "inactive", hit btn:[Save]: + +* Perform Lucene Index +* Optimise AOD Index + +Make sure that you have correctly configured the crontab configuration, as described at the bottom of the Schedulers page. + +== Initial indexing + +After having setup the scheduled task, perform a full indexing by pressing btn:[Schedule full indexing]. + +== Switch the search engine to Elasticsearch Now go to the Search Settings, and set `Elasticsearch Engine` as the search engine. You can customize the modules that are used for indexing in the modules section. From 7a9ace91046b3e6c0f18268dc4d4bc43e26c5eba Mon Sep 17 00:00:00 2001 From: Jan Siero Date: Fri, 8 Dec 2023 16:32:55 +0100 Subject: [PATCH 2/5] Update Set up SuiteCRM.adoc --- .../search/elasticsearch/Set up SuiteCRM.adoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc index 088a9bb6b..2d2c542fc 100644 --- a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc +++ b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc @@ -28,8 +28,14 @@ Once you are satisfied with your settings hit btn:[Save]. == Setup the scheduled task +The Elasticsearch data is updated each time a record is created, changed, deleted and imported. Nevertheless a scheduled task is required to enable the initial indexing and maintenance of the search engine. + Go to the admin panel, open Scheduler. On the side panel click "Create Scheduler". -In the Jobs dropdown, select "Elasticsearch indexer". In Job Name, enter a self chosen title, for example "Elasticsearch", hit btn:[Save]. +In the Jobs dropdown, select "Elasticsearch indexer". + +* At Job Name, enter a self chosen title, for example "Elasticsearch" +* At Interval you spefify the frequency at which the job should run. A frequency of about once a day should be sufficient. To have the task run at 4 o'clock at night, click "Advanced Options" and enter 0 at min and 4 at hrs, leave date, mo, day as they are. +* hit btn:[Save]. As AOD Lucene Indexing will no longer be used, edit the following entries in the Scheduler list, set status to "inactive", hit btn:[Save]: @@ -40,7 +46,7 @@ Make sure that you have correctly configured the crontab configuration, as descr == Initial indexing -After having setup the scheduled task, perform a full indexing by pressing btn:[Schedule full indexing]. +After having setup the scheduled task, perform a full indexing by going back to the Elastisearch setting page and pressing btn:[Schedule full indexing]. Independently to the configured frequency for the Elasticsearch Job, this task starts running within a minute, provided that the crontab has been configured correctly. == Switch the search engine to Elasticsearch From 95f8f788b2cbf00c706b0a904dca7a6954c75c18 Mon Sep 17 00:00:00 2001 From: Jan Siero Date: Tue, 12 Dec 2023 14:22:24 +0100 Subject: [PATCH 3/5] improvement Elasticsearch doc Correction of description on manual indexing --- .../search/elasticsearch/Set up SuiteCRM.adoc | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc index 2d2c542fc..407edff45 100644 --- a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc +++ b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc @@ -26,9 +26,20 @@ You can use btn:[Test connection] to see if the current configuration is working Once you are satisfied with your settings hit btn:[Save]. +== Initial indexing + +After having saved, perform a full indexing by opening the Elastisearch setting page again and now pressing btn:[Schedule full indexing]. This task starts running within a minute, provided that the crontab has been configured correctly. + +== Switch the search engine to Elasticsearch + +Now go to the Search Settings, and set `Elasticsearch Engine` as the search engine. +You can customize the modules that are used for indexing in the modules section. + +image:SearchSettingsForElasticsearch.png["Configure the search Settings"] + == Setup the scheduled task -The Elasticsearch data is updated each time a record is created, changed, deleted and imported. Nevertheless a scheduled task is required to enable the initial indexing and maintenance of the search engine. +The Elasticsearch data is updated each time a record is created, changed, deleted and imported. Nevertheless a scheduled task keeps the elastic data in sync with the SuiteCRM database. Go to the admin panel, open Scheduler. On the side panel click "Create Scheduler". In the Jobs dropdown, select "Elasticsearch indexer". @@ -43,14 +54,3 @@ As AOD Lucene Indexing will no longer be used, edit the following entries in the * Optimise AOD Index Make sure that you have correctly configured the crontab configuration, as described at the bottom of the Schedulers page. - -== Initial indexing - -After having setup the scheduled task, perform a full indexing by going back to the Elastisearch setting page and pressing btn:[Schedule full indexing]. Independently to the configured frequency for the Elasticsearch Job, this task starts running within a minute, provided that the crontab has been configured correctly. - -== Switch the search engine to Elasticsearch - -Now go to the Search Settings, and set `Elasticsearch Engine` as the search engine. -You can customize the modules that are used for indexing in the modules section. - -image:SearchSettingsForElasticsearch.png["Configure the search Settings"] From cb2082690cfc3ca6caec50d3b4b804df9924a63b Mon Sep 17 00:00:00 2001 From: Jan Siero Date: Tue, 12 Dec 2023 15:59:35 +0100 Subject: [PATCH 4/5] elastic search scheduler configuration adapt description in case a task already exists --- .../search/elasticsearch/Set up SuiteCRM.adoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc index 407edff45..6f8bbedae 100644 --- a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc +++ b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc @@ -41,10 +41,11 @@ image:SearchSettingsForElasticsearch.png["Configure the search Settings"] The Elasticsearch data is updated each time a record is created, changed, deleted and imported. Nevertheless a scheduled task keeps the elastic data in sync with the SuiteCRM database. -Go to the admin panel, open Scheduler. On the side panel click "Create Scheduler". -In the Jobs dropdown, select "Elasticsearch indexer". +Go to the admin panel, open Scheduler. Check if a Task with a name like "Perform Elasticsearch index" already exists. -* At Job Name, enter a self chosen title, for example "Elasticsearch" +If no such tusk exists, then on the side panel click "Create Scheduler". In the Jobs dropdown, select "Elasticsearch indexer". + +* At Job Name, enter a self chosen title, for example "Perform Elasticsearch index" * At Interval you spefify the frequency at which the job should run. A frequency of about once a day should be sufficient. To have the task run at 4 o'clock at night, click "Advanced Options" and enter 0 at min and 4 at hrs, leave date, mo, day as they are. * hit btn:[Save]. From b63b9934d06f6a5a12e75d7b8828fdd5703996e9 Mon Sep 17 00:00:00 2001 From: Jan Siero Date: Tue, 12 Dec 2023 16:01:02 +0100 Subject: [PATCH 5/5] Elastic search scheduler corrections --- .../search/elasticsearch/Set up SuiteCRM.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc index 6f8bbedae..a28b02cb9 100644 --- a/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc +++ b/content/admin/administration-panel/search/elasticsearch/Set up SuiteCRM.adoc @@ -43,8 +43,9 @@ The Elasticsearch data is updated each time a record is created, changed, delete Go to the admin panel, open Scheduler. Check if a Task with a name like "Perform Elasticsearch index" already exists. -If no such tusk exists, then on the side panel click "Create Scheduler". In the Jobs dropdown, select "Elasticsearch indexer". +If no such task exists, then on the side panel click "Create Scheduler". +* In the Jobs dropdown, select "Elasticsearch indexer" * At Job Name, enter a self chosen title, for example "Perform Elasticsearch index" * At Interval you spefify the frequency at which the job should run. A frequency of about once a day should be sufficient. To have the task run at 4 o'clock at night, click "Advanced Options" and enter 0 at min and 4 at hrs, leave date, mo, day as they are. * hit btn:[Save].