...
The Islandora Solr Search module is packaged with files that will support Islandora solution packs, but these can be modified if you are familiar with Solr. Specifically the Solr schema and corresponding Gsearch XSLT are a good starting point even if you do not use the Solr Search module. Additional information about Solr is presented in Chapter 4: Search and Discovery in Islandora (The Solr Module).
...
Installing Solr and GSearch
1. Download fedoraGSearch from SourceForge.net and extract the contents of the compressed file. Copy the file GSearch 2.6, unzip and copy fedoragsearch.war to the Tomcat webapps folder ($CATALINA_HOME/webapps).
Code Block |
---|
|
cp ~/$ unzip fedoragsearch-2.6.zip
$ cd fedoragsearch-2.6
$ cp -v fedoragsearch.war $FEDORA_HOME/usr/local/fedora/tomcat/webapps/ |
2. Download Solr to your local environment and unpack the downloaded file.4.2.0 and unpack.
Code Block |
---|
|
$ tar -xzvf solr-4.2.0.tgz |
3. Create a directory for Solr, and copy the contents of solr-4.2.0/example/solr. These instructions presume that it will be installed at ~/opt/usr/local/fedora/solr:
Code Block |
---|
|
$ mkdir -p /opt/solr |
4. Drag or mv the .war file that is located under the dist directory of your unpacked download to the newly created /opt/solr directory.
5. Copy the directory apache-solr-x.x.x/example/solr to $FEDORA_HOME/solr and /exmaple/webapps/solr.war to $FEDORA_HOME/tomcat/webapps
Code Block |
---|
cp -r apache-solr-x.x.x/example/solr $FEDORA_HOME/solr
cp apache-solr-x.x.x/example/webapps/solr.war $FEDORA_HOME/tomcat/webapps/ |
usr/local/fedora/solr
$ cp -Rv solr-4.2.0/example/solr/* /usr/local/fedora/solr |
4. Copy (and rename) solr-4.2.0.war to $CATALINA_HOME/webapps.
Code Block |
---|
|
$ cp -v solr-4.2.0/dist/solr-4.2.0.war /usr/local/fedora/tomcat/webapps/solr.war |
56. Edit the file $FEDORA_HOME/server/config/fedora-users.xml to add an additional user:
Code Block |
---|
|
<user name="fgsAdmin" password="[password]">
<attribute name="fedoraRole">
<value>administrator</value>
</attribute>
</user> |
6. Restart Fedora to deploy GSearch and Solr
Code Block |
---|
|
$ </user>/usr/local/fedora/tomcat/bin/shutdown.sh
$ /usr/local/fedora/tomcat/bin/startup.sh
|
7. Edit the file $FEDORA_HOME/tomcat/webapps/fedoragsearch/FgsConfig/fgsconfig-basic-for-islandora.properties. The entries below are of an example setup.
Code Block |
---|
configDisplayName=configProductionOnSolrconfigProductionSolr
gsearchBase=http://localhost:8080
gsearchAppName=fedoragsearch
gsearchUser=fgsAdmin
gsearchPass= [password]
local.FEDORA_HOMEfinalConfigPath=/usr/local/fedora/tomcat/webapps/fedoragsearch/WEB-INF/classes
logFilePath=/usr/local/fedora/server/logs
logLevel=DEBUG
namesOfRepositories=FgsRepos
namesOfIndexes=FgsIndex
[keep name in order not to modify GUI for GSearch]
fedoraBase=http://localhost:8080
[to access objects from index in GUI for GSearch]
fedoraAppName=fedora
fedoraUser=fedoraAdmin
fedoraPass=[password]
fedoraVersion=3.7.0
objectStoreBase=/usr/local/fedora/data/objectStore
indexEngine=Solr
indexBase=http://localhost:8080/solr
indexDir=${local.FEDORA_HOME}/usr/local/fedora/solr/collection1/data/index
indexingDocXslt=foxmlToSolr |
Note |
---|
Gsearch properties files are sensitive. A space after the text at the end of a line may cause that entry to fail. |
8. Edit $FEDORA_HOME/tomcat/webapps/fedoragsearch/FgsConfig/fgsconfig-basic.xml (replace 'fgsconfig-basic.properties' with 'fgsconfig-basic-for-islandora.properties'):
Code Block |
---|
|
-- <property file="fgsconfig-basic.properties" />
-- <copy file="fgsconfig-basic.properties" tofile="fgsconfig-basic-${configDisplayName}.properties" preservelastmodified="true" />
-- <copy file="fgsconfig-basic.properties" tofile="${templateConfigPath}/${configDisplayName}/${finalConfigName}/fgsconfig-basic-${configDisplayName}.properties" preservelastmodified="true" />
++ <property file="fgsconfig-basic-for-islandora.properties" />
++ <copy file="fgsconfig-basic-for-islandora.properties" tofile="fgsconfig-basic-${configDisplayName}.properties" preservelastmodified="true" />
++ <copy file="fgsconfig-basic-for-islandora.properties" tofile="${templateConfigPath}/${configDisplayName}/${finalConfigName}/fgsconfig-basic-${configDisplayName}.properties" preservelastmodified="true" /> |
9. Navigate to $FEDORA_HOME/tomcat/webapps/fedoragsearch/FgsConfig/and run Apache ant on fgsconfig-basic.xml
Code Block |
---|
|
$ cd $FEDORA_HOME/usr/local/fedora/tomcat/webapps/fedoragsearch/FgsConfig/
$ ant -f fgsconfig-basic.xml |
910. Rename the current Solr schema.xml file to schema.bak
Code Block |
---|
|
$ mv $FEDORA_HOME-v /usr/local/fedora/solr/collection1/conf/schema.xml $FEDORA_HOME/solr/collection1/conf/schema.bak |
1011. Copy the new, ant-generated Solr schema into place as schema.xml
Code Block |
---|
|
$ cp -v /usr/local/fedoracp $FEDORA_HOME/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/conf/schema-x4.x2.x0-for-fgs-x2.x6.xml $FEDORA_HOME/solr/collection1/conf/schema.xml |
12. Create a context file for Solr at /usr/local/fedora/tomcat/conf/Catalina/localhost/solr.xml
...
Code Block |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="/usr/local/fedora/tomcat/webapps/solr.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/usr/local/fedora/solr" override="true"/>
</Context>
|
1311. Restart Fedora.
Code Block |
---|
|
$ /usr/local/fedora$FEDORA_HOME/tomcat/bin/shutdown.sh
$FEDORA_HOME$ /usr/local/fedora/tomcat/bin/startup.sh |
1412. Test your installation by going to http://localhost:8080/fedoragsearch/rest
- Login using fgsAdminfedoraAdmin
- Click on updateindex
- Click on updateIndex fromFoxmlFiles
15. GSearch and Solr will need to be further configured to index specific datastreams. Sample GSearch and Solr configurations can be found here and here.
Installing & Configuring the Solr Search Module
...
- Verify that fedoraGSearch and Solr are both installed and running.
- Download the islandora_solr_search Islandora Solr Search module and install as a Drupal module.Then, download and uncompress the Apache Solr php client and copy the Solr directory under Apache from the archive to the islandora_solr_search module's folder.
- Log in to your Drupal site to enable the islandora_solr_search module.
- Administer > Modules and enable Islandora Solr Search