ArkCase requires a separate Solr installation; do not use the Solr installation that ships with Alfresco.
Download SOLR 4.8.1 from https://lucene.apache.org/solr/downloads.html.
Below instructions are suitable for small installations. Large-scale Solr installations are beyond the scope of this document.
- Unzip the Solr distribution to a directory of your choice; this directory will be the Solr home directory. In the below steps, the token $SOLR refers to this directory.
- cd to $SOLR
- Copy the example folder to a new acm3 folder (cp -a example acm3). This command will automatically create new acm3 folder and will copy all content from example to the new acm3 folder.
- cd to the acm3 folder
- remove the example-DIH and example-schemaless folder (rm -rf example-DIH, rm -rf example-schemaless)
- cd to the solr folder (under the acm3 folder; i.e., $SOLR_HOME/acm3/solr)
- rename the collection1 folder to acmQuickSearch (mv collection1 acmQuickSearch)
- cd to the acmQuickSearch folder
- edit the core.properties file; set the name property to acmQuickSearch
- cd back to the acm3 folder (cd ../..)
- Copy acmQuickSearch to acmAdvancedSearch (cp -a acmQuickSeach acmAdvancedSearch). Under solr folder you should now have both acmQuickSearch and acmAdvancedSearch.
- Edit acmAdvancedSearch/core.properties; set the name property to acmAdvancedSearch
- Start SOLR: nohup java -jar start.jar –daemon &
If all went well you can view the SOLR dashboad. NOTE, the trailing / must be there! http://<host>:8983/solr/
Configure Solr
Acquire 1 file from the ArkCase distribution site:
- solr/schema.xml
Copy the schema.xml file to both ArkCase Solr cores:
- Stop Solr
- Quicksearch: copy to folder $SOLR/acm3/solr/acmQuickSearch/conf
- Advanced search: copy to folder $SOLR/acm3/solr/acmAdvancedSearch/conf
- Start Solr
On Linux, the Solr startup script should look something like this; make sure the bolded portions are correct for your system. Notice the system property “-Dsolr.autoSoftCommit.maxTime=1000”. It causes a Solr soft commit every second. This value is the maximum latency between when an object is committed in ArkCase and when it appears in search results. Higher values mean less work for Solr so perhaps less hardware needed to run Solr. Higher values also mean your users may see lag times between object updates and corresponding updates in search results.
- #!/bin/sh
- # Starts, stops, and restarts Apache Solr.
- #
- # chkconfig: 35 92 08
- # description: Starts and stops Apache Solr
- SOLR_DIR=”/opt/solr-4.8.1/acm3“
- JAVA_OPTIONS=”-Xms512m -Xmx512m -DSTOP.PORT=8079 -DSTOP.KEY=gdead -Dsolr.autoSoftCommit.maxTime=1000 -jar start.jar”
- LOG_FILE=”/opt/solr-4.8.1/acm3/logs/solr.log“
- JAVA=”/usr/java/default/bin/java“
- SOLR_USER=acmuser
- case $1 in
- start)
- echo “Starting Solr”
- su – $SOLR_USER –c “cd $SOLR_DIR ; $JAVA $JAVA_OPTIONS –daemon > $LOG_FILE &”
- ;;
- stop)
- echo “Stopping Solr”
- su – $SOLR_USER –c “cd $SOLR_DIR ; $JAVA $JAVA_OPTIONS –stop > $LOG_FILE &”
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo “Usage: $0 {start|stop|restart}” >&2
- exit 1
- ;;
- esac