Technical documentation for ArchivesSpace
View the Project on GitHub archivesspace/tech-docs
There are two strategies for reindexing ArchivesSpace:
A soft reindex updates the existing documents in Solr without directly touching the actual index documents on the filesystem. This can be done while the system is running and is suitable for most use cases.
There are two common ways to perform a soft reindex:
ArchivesSpace keeps track of what has been indexed by using the files
under data/indexer_state
and data/indexer_pui_state
(for the PUI).
If these files are missing, the indexer assumes that nothing has been
indexed and reindexes everything. To force ArchivesSpace to reindex all
records, just delete the files in /path/to/archivesspace/data/indexer_state
and /path/to/archivesspace/data/indexer_pui_state
.
You also can do this selectively by record type, for example, to reindex
accessions in repository 2 delete the file called 2_accession.dat
.
system_mtime
values in the databaseIf you update a record’s system_mtime
it becomes eligible for reindexing.
#reindex all resources
UPDATE resource SET system_mtime = NOW();
#reindex resource 1
UPDATE resource SET system_mtime = NOW() WHERE id = 1;
A full reindex is a complete rebuild of the index from the database. This may be required if you are having indexer issues, in the case of index corruption, or if called for by an upgrade owing to changes in ArchivesSpace’s Solr configuration.
To perform a full reindex:
rm -rf /path/to/archivesspace/data/indexer_state/
rm -rf /path/to/archivesspace/data/indexer_pui_state/
rm -rf /path/to/archivesspace/data/solr_index/
For external Solr there is a plugin that can perform all of the re-indexing steps: aspace-reindexer
Manual steps:
rm -rf /path/to/archivesspace/data/indexer_state/
rm -rf /path/to/archivesspace/data/indexer_pui_state/
curl -X POST -H 'Content-Type: application/json' --data-binary '{"delete":{"query":"*:*" }}' http://${solrUrl}:${solrPort}/solr/archivesspace/update?commit=true
You can watch the Tips for indexing ArchivesSpace youtube video to see these steps performed.