Neidio i'r brif gynnwys

Create indexes

yn ElasticSearch
Rhestr o awduron
Cyhoeddwyd: Dec 7, 2023|Diweddarwyd diwethaf: Dec 7, 2023

Creating a new ElasticSearch indexCopy link to Creating a new ElasticSearch index to clipboard

GUICopy link to GUI to clipboard

You can create a new index for a Deskpro instance within the OPC web GUI. Navigate to your instances ElasticSearch page and click 'Edit Parameters' on the Connection card.

image.png

On the next page in the 'Index' field, enter the name of the new index you want to create.

image.png

Clicking 'Validate' will check for previous ElasticSearch indexes with the same name.

If you use an index name that already exists, you will have a prompt to confirm if you want to overwrite the existing data.

image.png

Confirming you want to overwrite the data will then let you click 'Save Changes' to apply the new index name.

image.png

If you use an index name that is not in use, validation will succeed, and you can then click 'Save Changes' to apply the new name.

image.png

CLICopy link to CLI to clipboard

To create a new index on the command line you run the following command:

opc inst -i <instance> config set --es-index <new_index_name>
copy
Note


This will not prompt for validation so take care not to overwrite existing ElasticSearch data.

Running the command will reconfigure the instance and confirm the new index name.

root@deskpro:~# opc inst -i helpdesk config set --es-index dp_helpdesk_new Set configuration parameters ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✅ Updated Elasticsearch parameters configuration successfully Write instance config ✅ Wrote instance config file └ Path: /opt/deskpro/data/instances/helpdesk/config.yml Write Deskpro config ✅ Wrote Deskpro config file └ Path: /opt/deskpro/data/instances/helpdesk/services/deskpro/config/deskpro-config.php Re-indexing instance ✅ Re-indexed instance successfully Done ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ All tasks have completed. Name | helpdesk UUID | efe1e213-c61b-4c6c-a76c-95a6b24c1e2b Data Path | /opt/deskpro/data/instances/helpdesk DB Host | localhost:3306 DB User | helpdesk DB Name | helpdesk Elastic Host | http://localhost:9200 Elastic TenantID | dp_helpdesk_new_tenant
copy
DefnyddiolAnnefnyddiol
tudalen nesafRe-index

Mewngofnodwch neu cofrestrwch i gyflwyno sylw.