Re-indexing an instances search index
If you are experiencing issues with your search, such as the search not returning items which should exist, or it returns items which have been deleted, your search index may be out of sync with Deskpro.
You may need to re-sync your search index, this can be done on both the OPC Web GUI or on the CLI.
Web GUI
You can check if your index is out of sync for a specific instance by selecting the ElasticSearch option under Services on the Instance page.


You may notice a minor performance hit and incomplete search results while ElasticSearch is reindexing.
CLI
The following command will reset the search index:
opc inst -i {instanceID} index reindex copy
This will output the document counts during the re-index
root@deskpro:~# opc inst -i helpdesk index reindex
Running instance re-index
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Re-populate the instance
✅ Successfully ran populate command
└ Indexing documents...
Initializing max IDs
====================
ticket: max id 190
person: max id 84
organization: max id 4
article: max id 12
download: max id 2
news: max id 4
guide_topic: max id 29
community_topic: max id 2
chat_conversation: max id 116
task: max id 52
Inserting batch index jobs
==========================
ticket: 191
person: 85
organization: 5
article: 13
download: 3
news: 5
guide_topic: 30
community_topic: 3
chat_conversation: 117
task: 53
✅ Successfully re-populated instance search
copy
Your search functionality may be reduced until the index has been repopulated, which can take some time depending on the number of documents that need to be indexed.
Mewngofnodwch neu cofrestrwch i gyflwyno sylw.