[toc]
Note: Release 9.0 requires Solr 4.10.1, which is packaged with the product.
You might want to install multiple Solr instances simultaneously when it's necessary to enable independent searches for multiple Telligent Community Server sites, such as when you have a single server hosting development and staging, but don't want to purchase or use another server.
The assumptions in this procedure are that:
- You have a working, viable installation of Tomcat 6.0. If you do not have it, install the right version.
- You are going to make at least two Solr instances (such as "Solr1" and "Solr2"), but this number could be increase to any number of instances your server can support.
- You've installed Solr at the default location - c:\Program Files\Apache Software Foundation\Tomcat 6. If you planned a different location, always replace the directory values in these commands with your correct installation path.
- You plan to run the same version of Solr on all instances. Even though you are running the same version of the software in each instance, you can still configure and/or customize each one differently.
Set up at least one Solr instance
Community Server requires Solr 4.10.1.
The instructions have been adapted from documentation on multiple Solr application installations. If you already have one running instance of Solr, skip to If you already have a Solr instance.
- From your extracted Community Server download ([community download]), locate the Search folder. You will use the contents of this folder in later steps.
- Stop the Tomcat service using the Tomcat tray icon or the Service Manager (Start > Run > Services.msc - look for "Apache Tomcat").
- Create two directories for each Solr instance, for example c:\solr\solr1 and c:\solr\solr2, and then copy the contents from community download]\Search\solr directory to both c:\solr\solr1 and c:solr\solr2.
- Copy [community download]\Search\solr.war to the Tomcat lib directory - c:\Program Files\Apache Software Foundation\Tomcat 6.0\lib.
- Make a new text file in c:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost called solr1.xml with the following code fragment:
<Context docBase="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\solr.war"
debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String"
value="c:\solr\solr1" override="true" />
</Context> - The Catalina\localhost directory might not exist, so you might need to create it. Do not forget about the Catalina directory.
- Make a new text file in c:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost called solr2.xmlwith the following code fragment:
<Context docBase="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\solr.war"
debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String"
value="c:\solr\solr2" override="true" />
</Context> - Important: If you plan on querying Solr using international characters, refer to URI character set configuration for additional configuration information.
- Recommendation: If you have a medium- to large-sized community, you should increase the memory allocated to the Java Virtual Machine. The default allocated memory is 64MB; you should consider giving it 512MB or more. To increase the memory for the JVM:
- Right-click the Tomcat Manager in the system tray.
- Select the Java tab.
- Set the Maximum memory pool size (in MB) that you want to allocate to the JVM.
- Start the Tomcat service using the Tomcat tray icon or the Services Manager (Start > Run >Services.msc and look for "Apache Tomcat").
- Go to each instance's admin page to verify that the installation is working - http://localhost:8080/solr1/admin and http://localhost:8080/solr2/admin. Verify that the 'SolrHome' value for each instance is pointing to its respective directory. (Do this by checking the address in the browser's address bar.)
Configure a Community Server server to use a specific Solr instance
- Download the following communityserver_override.config file.
- Place this file in the root of your Telligent website directory.
- Find the following section in the communityserver_override.config file and replace the highlighted URL with the URL to your Solr instance.
<Override xpath="/CommunityServer/Search/Solr"
mode="change"
name="host"
value="http://yourserver:XXXX/PathToSolr/content"
/>
This URL is case-sensitive.
If you already have a Solr instance, transfer the current instance
- Stop Tomcat by clicking the Tomcat tray icon or close it in Service Manager (Start > Run > Services.msc and look for "Apache Tomcat").
- Create a location to host your existing instance - such as c:\solr\solr1. Note: This step is technically not required because you can configure Tomcat to look at the existing path. But for ease of management, our recommendation is to keep the instances next to each other.
- Move (do not copy) the files from your current Solr home directory to c:\solr\solr1. In a typical instance, this current home location might be c:\Program Files\Apache Software Foundation\Tomcat 6.0\Solr. Move them to the new directory as just described. Now that the existing Solr directory is empty, delete it.
- Open the c:\Program Files\Apache Software Foundation\Tomcat 6.0\Webapps folder and do the following:
- Delete the Solr folder.
- Move solr.war to the Tomcat lib folder, c:\Program Files\Apache Software Foundation\Tomcat 6.0\lib.
- Ensure that nothing related to Solr is still left in the webapps directory.
- Continue with setting up the Solr instances and assume this instance is "SOLR1."
Troubleshoot an installation of multiple Solr instances
- Having already created two or more instances of Solr, ensure that they do not have duplicate names.
- Before creating the solr1.xml configuration text file (using the code fragment), ensure that the Catalina\localhost directory already exists.
- When you edit the communityserver_override.config file to change the Solr host value, remember that the text entry is case-sensitive.
- After you move an existing Solr instance's files from its previous home directory to the new host directory, ensure that you delete the previous home Solr directory.
- Make sure that the communityserver_override.config file with the Solr host value is in both your web root folder and in the Jobs Scheduler folder. See Install the Telligent Job Service for more information.