FileCloud advanced search uses Solr (an open source component) in the backend, for its search capabilities. Follow these steps to install and configure Solr with FileCloud, to enable advanced search.
Before installing Solr, please ensure the system has JDK v1.7 or higher.
$ sudo apt-get install openjdk-7-jdk
|Win||Download latest JDK from here and install it.|
Step 1: Install Solr
Download Solr v5.3.1 from here. Download zip or tar ball depending on the OS, on which FileCloud server is installed. Solr installation is nothing but unzipping/untarring the downloaded zip/tar.
Unzip the downloaded tar ball solr-5.3.1.zip onto /opt directory.
user@/opt$ sudo unzip /tmp/solr-5.3.1.zip
|Win||Unzip the downloaded zip file solr-5.3.1.zip onto C:\FileCloud. Note: Any other directory can be used to install|
Step 2: Start Solr
Use one of the following methods to start Solr, depending on your requirements.
- Method 1: Solr comes with all necessary components to run it as a server. Start the Solr server by running the following command:
|Win||C:\FileCloud\solr-5.3.1\bin\> solr start|
- Method 2: Solr might contact external servers, if the uploaded documents have embedded external entities. To prevent this, please start Solr as follows:
|Win||C:\FileCloud\solr-5.3.1\bin\> solr start -a "-DsocksProxyHost=127.0.0.1"|
Note: In this method, we just specify localhost as a socks proxy, assuming localhost is not running any proxies. Now all outgoing http connections will be blocked.
Note: Please follow the instructions here to run Solr as service.
Optional 1: Restrict Solr To Localhost
By default, Solr is bound to listen for requests from all IP addresses. Sometimes admin might need to restrict this to only to localhost. To do this, edit the jetty-http.xml file.
|OS||Location of jetty-http.xml|
Look for the following line:
<Set name="host"><Property name="jetty.host"/></Set>
and change it to:
<Set name="host"><Property name="jetty.host" default="127.0.0.1" /></Set>
Upon restarting, Solr will listen only at the localhost (127.0.0.1).
Optional 2: Stop Solr
If for some reason, Solr needs to be stopped, issue the following command:
user@/opt/solr-5.3.1/bin$ sudo ./solr stop -all
|Win||C:\FileCloud\solr-5.3.1\bin\> solr stop -all|