About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:re-indexing

Re-Indexing

As VuFind® develops, from time to time or between releases you may be expected to re-index your records. If your data changes frequently, you may also find it worthwhile to do occasional full refreshes to ensure that your index is accurate (just in case your incremental update processes ever miss changes for any reason). Before re-indexing, it is a good idea to clear out the entire index to ensure that any records which have been deleted from the source system do not persist in your search results. Whenever you need to rebuild your index, simply follow these steps:

1. Stop Solr from running.

See the Starting and Stopping page for details.

2. Delete your index on the server.

VuFind®'s main index is found in the solr/biblio/index directory (as well as any spellcheck-related directories) under your installation. In Linux, you can issue this command:

rm -rf $VUFIND_HOME/solr/vufind/biblio/index $VUFIND_HOME/solr/vufind/biblio/spell*

In Windows, you can easily delete the folders through Windows Explorer.

If you want to delete one of VuFind®'s secondary indexes (authority records, course reserves, etc.), the process is the same, but you just need to replace “biblio” with the name of the appropriate Solr core. Additionally, some cores will only have an “index” folder – the spell* folders are not always present.

3. Start the VuFind® server back up.

See the Starting and Stopping page for details.

4. Import all of your records again.

See the instructions on the indexing page for details.

5. [ Optional: re-index spellcheck. ]

By default, VuFind®'s Solr index is configured to generate spellcheck indexes after being optimized. You can optimize the index with this command:

php $VUFIND_HOME/public/index.php util/optimize

However, if you have a non-default setup or simply do not wish to run optimization for any reason, you can re-index both spelling indexes manually.

This is the command for the default “spellShingle” index:

curl http://localhost:8983/solr/biblio/select?q=*:*&spellcheck=true&spellcheck.build=true

And this is the command for the basicSpell “spellcheck” index:

curl http://localhost:8983/solr/biblio/select?q=*:*&spellcheck.dictionary=basicSpell&spellcheck=true&spellcheck.build=true
indexing/re-indexing.txt · Last modified: 2024/07/15 19:04 by demiankatz