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.5.2.
To add support for a new Solr instance (named x
, for instance):
- Go into the
sets/
directory. - Create a new
x.indexes
file. 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.xml
file to define its Solr configuration. This can likely just be a copy offe.solr.xml
. - Create a new
x.ram
file 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
y
on it. - Go into the
cores/
directory. - Create a new directory
y
for the index. - It is easiest to copy an existing simple core, so
cp authorsAC/* y
. - Edit
y/core.properties
to set the name of the new core to bey
. - Edit
y/schema.xml
and 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/b
and 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 d
and 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/b
and then run./startSolr.sh