All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
lucene-core-3.5.0.jar
, in order to upgrade a DSpace 1.6.x, 1.7.x or 1.8.x index.lucene-core-3.5.0.jar
from http://search.maven.org/remotecontent?filepath=org/apache/lucene/lucene-core/3.5.0/lucene-core-3.5.0.jar [dspace-source]/dspace/target/dspace-installer/
directory (i.e. the directory where you ran "ant update" from)ant update
". This time, it should find the lucene-core-3.5.0.jar
locally and re-attempt the upgrade of your Solr indexes.If you are using an older version of DSpace, you will see errors similar to this one until you manually upgrade your index:
Code Block |
---|
Caused by: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource: segment _386q in resource ChecksumIndexInput(MMapIndexInput(path="/space/dspace/solr/statistics/data/index/segments_37m6"))): 2.x. This version of Lucene only supports indexes created with release 3.0 and later. |
Manually upgrading your Solr index involves temporarily downloading an older version of Lucene (on which Solr is based), and calling its IndexUpgrader script, e.g.
Code Block |
---|
# Download Lucene 3.5.0, which can upgrade older Solr/Lucene indexes wget "http://search.maven.org/remotecontent?filepath=org/apache/lucene/lucene-core/3.5.0/lucene-core-3.5.0.jar" -O lucene-core-3.5.0.jar # Then, actually upgrade the indexes by loading the lucene-core-3.5.0.jar and calling IndexUpgrader # Upgrade the Usage Statistics index. Run this if you have Solr Usage Statistics enabled in your UI. java -cp lucene-core-3.5.0.jar org.apache.lucene.index.IndexUpgrader [dspace]/solr/statistics/data/index/ # Upgrade the OAI-PMH indexes. Run this if you use the "oai" webapp. java -cp lucene-core-3.5.0.jar org.apache.lucene.index.IndexUpgrader [dspace]/solr/oai/data/index/ # NOTE: You do not need to upgrade the Discovery Search and Browse indexes as they will be automatically rebuilt on upgrade (See previous upgrade step) |
Upgrading from DSpace 3.x or above: DSpace provides optimization commands for all Solr indexes. Which ones you need to run depend on which features you are using in DSpace.
Code Block |
---|
# First, ensure your Tomcat is started up. All of the below commands will call Solr directly, which requires Tomcat to be running. # Optimize Usage Statistics (based on Solr). Run this if you have Usage Statistics enabled in your UI. [dspace]/bin/dspace statstats-util -o # Optimize OAI-PMH indexes (based on Solr). Run this if you use the "oai" webapp. [dspace]/bin/dspace oai import -o # NOTE: You should not need to optimize the Discovery Search and Browse indexes, as they will be automatically rebuilt on upgrade (See previous upgrade step) # However, you still may wish to schedule optimizing of Discovery Search & Browse (via cron or similar) # [dspace]/bin/dspace index-discovery -o |
...