The mgisolr product includes:
- the definitions for the various Solr indexes supporting the MGI web site
- knowledge of how to take those definitions and build the necessary directory hierarchies for the fe, snp, and gxd Solr instances
It assumes:
- The directory containing the Solr instance is defined in SOLR_HOME.
- The currently supported Solr version is 8.11.3.
To add support for a new Solr instance (named x, for instance):
- Go into the
sets/directory. - Create a new
x.indexesfile. It can be empty at first. It will have one index (core) name on each line when you add indexes. - Create a new
x.solr.xmlfile to define its Solr configuration. This can likely just be a copy offe.solr.xml. - Create a new
x.ramfile to define how much RAM to devote to Solr. (This sets both -Xms and -Xms for the JVM.)
To add a new Solr index (adding index y to Solr instance x, for instance):
- Open
sets/x.indexes. - Add a new line with
yon it. - Go into the
cores/directory. - Create a new directory
yfor the index. - It is easiest to copy an existing simple core, so
cp authorsAC/* y. - Edit
y/core.propertiesto set the name of the new core to bey. - Edit
y/schema.xmland go to the bottom where the customizations for each index live. - Remove the old <fieldType>, <field>, and <copyField> definitions.
- Add <fieldType> and <field> definitions as needed.
- Add <copyField> definitions if needed.
- Ensure <uniqueKey> is set properly.
To build a new installation for instance x under directory a, named as subdirectory b, and running on port c:
- Set your SOLR_HOME environment variable to the installation directory for Solr itself.
- Go into your
mgisolr/directory. - Run
./buildInstance x c a b. - At that point, you can
cd a/band then run./startSolr.sh
To apply updated index definitions to an instance of x that lives in directory d and NOT erase the contents of those directories (so you can re-index a single core and leave the others as-is):
- Set your SOLR_HOME environment variable to the installation directory for Solr itself.
cd d- Run
./stopSolr.sh - Go into your
mgisolr/directory. - Run
./rebuildInstance x d. - At that point, you can
cd dand then run./startSolr.sh
To completely rebuild a new installation for instance x under directory a, named as subdirectory b, and running on port c (leaving empty indexes):
- Set your SOLR_HOME environment variable to the installation directory for Solr itself.
- Go into your
mgisolr/directory. - Run
./buildInstance x c a b replace. - At that point, you can
cd a/band then run./startSolr.sh