Set up the Solr home directory
Solr uses a feature called “core auto discovery” to find the cores to use. Solr scans the specified SOLR_HOME directory to find (sub-) directories containing a core.properties file. Solr will try to attach any core it finds in there. Each core represents an instance of a running Solr installation with its own directory structure and configuration files. A subdirectory within each core is used for storing the full-text index.
An ImageMaster Solr home ZIP archive is provided with ImageMaster for supported Solr versions (X.Y), like:
-
ima-solrX.Y-home-latest.zip
The ZIP archive contains a directory structure for one core. If you intend to use more than one core you have to duplicate (and rename) the included folder “solr.core” for each core. The included solrcore.property file must be configured separately depending on the architecture role of the core.
Make sure to use the correct ZIP archive with the intended Solr version, which is solr“8.11.4 or 9.x.y (x.y ≥ 0.0)” in this case, and do not confuse this with older ZIP archives that you may have received for previously supported Solr versions.
Follow these steps:
-
Extract the following subfolder (X is a placeholder for the matching release and version numbers)
ima-solrX-home-9.XX.X-X-config.zip\ima-solrX-home-9.XX.X-X\solr.core
to the Solr home path, which by default is:
[SOLR INSTALL DIR]/server/solr
-
Rename the above mentioned subfolder “solr.core” to “master”.
-
Open the folder “master” and create a subfolder “lib” and a subfolder “data”.
-
Copy the ImageMaster JAR file into the folder “lib”:
ima-solrX.Y-extract-latest.jar
The folder structure in the Solr home directory should look like this:
-
Under the folder “master”, open the file “solr.properties” and add the following lines:
dataDir=data
name=master
config=solrconfig.xml
-
Edit the solr.xml file:
-
Set “maxBooleanClauses” to 1048576:
<int name="maxBooleanClauses">${solr.max.booleanClauses:1048576}</int>
-
Solr version < 9.0:
Set the “shardsWhitelist” parameter. Assuming that Solr is running on port 8983, an entry like the following is needed:
<shardHandlerFactory name="shardHandlerFactory" ... ... <str name="shardsWhitelist">localhost:8983/solr</str> ... </shardHandlerFactory>
Solr version ≥ 9.0:
For Solr version 9.0 and higher the defining allowed URLs for the shards parameter is not in the shardHandler configuration anymore. It is defined by the allowUrls top-level property of the solr.xml file:
<solr> ... ... <str name="allowUrls">
localhost:10080/solr,localhost:8983/solr,127.0.0.1:10080/solr</str> ... </solr>Also see Configuration file solr.xml (Solr version ≥ 9.0) for a full example.
-
-
Restart Solr.
-
Go to the Solr administration user interface (e.g. http://{YOUR SERVER}.local:8983/solr/#/) and check that the “master” collection is showing under the “core selector” drop down menu.
Many further operations can be handled by the Solr administration user interface [Solr Admin UI].