Portal uses the search engine ElasticSearch to perform fast searches. ElasticSearch maintains search indexes over items and ACLs which contain metadata for each respective category in a form which is appropriate for searching. These indexes are normally updated automatically when the system is being used. However, after certain error conditions, system crashes or backup restorations it may be necessary to rebuild the search indexes. Rebuilding can be performed without disturbing the production but as it will put extra load on the system and databases, care should be taken to schedule a rebuild during periods of low utilization.
To rebuild an index, click on Indexes in the admin menu and select the index you want to rebuild by clicking on the corresponding tab. You will see the current status of that reindexing process as well as some information about the last time the reindex process was run. To rebuild an index, click the Reindex button in the upper right hand corner.
Search reindex after upgrade¶
If the Portal Elastic index has changed from the previous Portal version you must reindex.
That is normally the case for Minor and Major upgrades, but should never be needed for Patch upgrades
Portal version before 4.0 used an older version of Elastic wher the indexes looked different.
Portal Elastic index should not change within Patch versions unless stated otherwise in the Release Notes.
Difference in Vidispine and Portal indexes¶
Portal and Vidispince indexes varies, but should essentially be the same. For example Vidispine only counts the files that belong to an Item, but Portal index counts all files. So Files index should always be greater for Portal than Vidispine.
If the index has been corrupt for some reason there are some useful management commands
/opt/cantemo/portal/manage.py recreate_portal_index Recreates all the indexes
/opt/cantemo/portal/manage.py recreate_item_index Recreates only the Item index
/opt/cantemo/portal/manage.py recreate_collection_index Recreates only the Collection index
/opt/cantemo/portal/manage.py recreate_file_index Recreates only the File index
Recreating indexes deletes the existing index and creates a new one.
When indexes are recreated search will not work properly until the indexes has been fully created