Prerequisites
You need to have a server running ElasticSearch 6.x or higher.
Changing the configuration
You will need to create a custom config override file in the following location:
/opt/deskpro/data/instances/{instance_ID}/services/deskpro/config/config.custom.php copy
If this is a new file, you will need to start it with a <?php
tag, then add the following configuration to configure your external elasticsearch service:
$CONFIG['elastic'] = [
/*
* An array of hosts. Any format that can be parsed with parse_url will work here.
* If none provided, then ES is disabled.
*
* E.g.: https://username:password!#$?*abc@foo.com:9200/elastic
*/
'hosts' => ['{custom es host}'],
/*
* True to verify the SSL cert
*/
'verify_ssl' => false,
/*
* Number of times to retry requests before giving up
*/
'retries' => 3,
/*
* The ES index name to put all documents
*/
'index_name' => 'deskpro',
/*
* A single index is used for every instance.
* Insert a unique site ID here. Documents include
* this ID on all documents, and all queries are filtered by it.
*/
'tenant_id' => '{instance_ID}',
]; copy
Indexing the new ElasticSearch server
The following commands will initialize and populate the ElasticSearch server with your instance's data:
opc inst -i {instance_ID} php services/search-indexing/artisan indexer:init
opc inst -i {instance_ID} php services/search-indexing/artisan indexer:populate copy
Please log in or register to submit a comment.