Using SOLR 6 in Alfresco Community Edition 5.2 (201612 GA)

Showing results for 
Search instead for 
Did you mean: 

Using SOLR 6 in Alfresco Community Edition 5.2 (201612 GA)

10 4 8,766

Unfortunately SOLR 6 / Alfresco Search Services was released as an Early Access (EA) module without any documentation, either part of, in this platform or at least bundled with the download. Documentation is not due to arrive until the Alfresco One 5.2 release in Februrary 2017 (as per reply to5.2 documentation does not contain SOLR 6 information ).

This page is a community attempt to collect basic information to allow members to setup SOLR 6.


Alfresco Search Services (SOLR 6) is available as a ZIP download viaAlfresco Community Edition file list 201612. Simply unzip the file to a location of your choice.

SOLR 6 comes with a Jetty container and no longer needs a Tomcat to run. The expanded bundle can be used immediately to startup SOLR. If you want to parameterize SOLR you can either pass command line arguments, or edit the / files and set parameters there.

Common parameters are:

  • SOLR_HOME - the path to the solrHome folder extracted from the bundle (default: ../solrHome relative to the solr folder)
  • SOLR_PORT - the port SOLR will listen to (default 8983)
  • SOLR_SOLR_CONTENT_DIR - the path to the folder where SOLR should cache compressed JSON files with node metadata (default: ContentData inside of solrHome)
  • SOLR_JAVA_MEM - JVM memory parameters
  • SOLR_LOGS_DIR - path to the directory for log output (defaults: ../../logs relative to the solr executable)

TODO: SSL parameters / setup

All SOLR command line interaction will be via the "./solr/bin/solr" executable (actually a .cmd in Windows). Use "./solr/bin/solr start" to start it and "./solr/bin/solr stop" to stop it. The / will be included for default configuration, but you can also pass settings to the executable. Use "./solr/bin/solr usage" for general usage guides and "./solr/bin/solr start -help" for specific start parameters.

Common command line parameters (for start AND stop) are:

  • -p 8983 - the port to bind to
  • -s path - the path to solrHome (long form: -solr.home path)
  • -m 2G - the amount of memory to allocate (will be used as -Xmx and -Xms)
  • -a "..." - to pass additional JVM parameters, e.g. system properties via -D

The Windows command file has various issues in handling parameters. (It has not been verified if .sh scripts suffer as well)

  • do not use quotes around the paths for either SOLR_HOME or SOLR_SOLR_CONTENT_DIR in if it contains a whitespace
  • if your intended path for the SOLR cache directory contains a whitespace you cannot use the -a parameter to pass it via the command line (e.g. -a "-Dsolr.content.dir=e:/Alfresco 52") and MUST use (using escaped quotes in the command line parameter to surround the path will cause other failures)

Configuring the Repository

Activation and configuration of the SOLR 6 subsystem is done via the alfresco-global.properites as with all previous SOLR versions.

The following properties should be set:

  • solr.secureComms=none
  • solr.port=8983

For some reason the port 8083 is set as the default on the Repository-tier which does not match the SOLR 6 default.

TODO: SSL setup

Creating SOLR cores

Different to SOLR 4, the SOLR 6 solrHome directory comes without any prepared cores and as such does not create any index for Alfresco at all. You must create new cores to begin tracking Alfresco and provide an index for searches. Cores are created similarily to how you would create cores for sharding, documented here (5.1 - creating shards manually).

Example URLs to create single cores for workspace://SpacesStore and archive://SpacesStore:

If your Alfresco Repository runs on a different port than 8080 you need to add the parameter "property.alfresco.port=port" to the URL.

These URLs will create the core configuration folders inside of the SOLR home folder where you can also modify their configuration afterwards (restart required).

SOLR 6 provides only two core templates:

  • rerank
  • rerankWithQueryLog