Enable Solr indexing
Each EMu module can be
configured to use either Texpress (texpress
) or Solr (solr
) indexing:
The
emuindexing
command is used to list the indexing enabled for each
module. Running emuindexing
without any arguments
will list each module along with its indexing setting. For example:
Table "eaccessionlots", indexing "texpress"
Table "eaudit", indexing "solr"
Table "ebibliography", indexing "texpress"
Table "ecatalogue", indexing "solr, data"
Table "ecollectionevents", indexing "solr"
Table "econdition", indexing "solr"
Table "econservation", indexing "texpress"
Table "edocuments", indexing "texpress"
Table "eevents", indexing "solr"
Table "eexhibitobjects", indexing "solr"
Table "eexports", indexing "texpress"
Table "efieldhelp", indexing "texpress"
Table "egroups", indexing "texpress"
Table "einsurance", indexing "texpress"
Table "einternal", indexing "solr"
Table "eloans", indexing "solr"
Table "elocations", indexing "solr"
Table "eluts", indexing "solr"
Table "emovements", indexing "solr"
Table "emultimedia", indexing "solr"
Table "enarratives", indexing "solr"
Table "eoperations", indexing "texpress"
Table "eparties", indexing "solr, data"
Table "eregistry", indexing "solr"
Table "erights", indexing "texpress"
Table "eschedule", indexing "texpress"
Table "esites", indexing "solr"
Table "estatistics", indexing "solr"
Table "etaxonomy", indexing "solr"
Table "etemplate", indexing "texpress"
Table "ethesaurus", indexing "solr"
Table "etrapevents", indexing "solr"
Table "etraps", indexing "solr"
Table "evaluations", indexing "solr"
Table "ewebgroups", indexing "texpress"
Table "ewebusers", indexing "texpress"
If Solr indexing is enabled, an optional JSON string
containing the record indexed can be produced as part of the indexing
process; the string can be used by third party applications that use the Solr
indexes to perform searches independently of EMu. If the option is enabled, the solr
indexing setting will be suffixed with
data
(see ecatalogue
and eparties
in the list above).
To list the index settings for the columns in a module, the -v
option can be used.
For example:
emuindexing -v eparties
will list the column indexes for the
eparties
module:
Table "eparties", indexing "solr"
irn
Type: Integer
Indexing: Key
SummaryData
Type: Text
Indexing: Word, Phonetic
ExtendedData
Type: Text
Indexing: Word
NamPartyType
Type: Text
Indexing: Word
NamTitle
Type: Text
Indexing: Word
NamFirst
Type: Text
Indexing: Word, Phonetic, Partial (1,3,5)
NamMiddle
Type: Text
Indexing: Word, Phonetic, Partial (1,3,5)
NamLast
Type: Text
Indexing: Word, Phonetic, Partial (1,3,5)
NamSuffix
Type: Text
Indexing: Word
...
The -s [texpress|solr]
option allows the indexing method for a
module to be changed.
For example:
emuindexing -s
solr eparties
will change the eparties
module
from using Texpress indexing to Solr indexing:
Table "eparties", indexing "texpress" => "solr"
Rebuilding modules...
eparties
Started at Fri Oct 29 15:04:53 AEDT 2021
Checking for index updates...
Stopping background load...
eparties 13322 killed (15) no. times signalled = 1
Closing database...
Reindexing...
Number of records updated = 10788
Opening database...
Starting background load...
fifo alive 26 Oct 2021 13:27:18
eparties 13462 started 29 Oct 2021 15:06:08
Finished at Fri Oct 29 15:06:08 AEDT 2021
Note: When the -s
option is applied to the emuindexing
command, five Texpress options are available to configure Solr's interaction with EMu. Details here.
If solr
indexing is set, the -d
option can be
specified to enable a JSON string of the record to be generated along with
the index information. For example:
emuindexing -d -s
solr eparties
will enable Solr indexing and also produce a JSON string containing the indexed record.
When the indexing attributes of a module are changed, a re-index takes place to build the new indexes for the indexing method selected. Part of the re-index may involve an index update that removes indexing from any columns not used by the client. Once the re-index is complete, the module is ready to be used with the selected indexing method. When switching indexing methods any files required by the old method, but not by the new, are removed ensuring minimal disk usage.