Introduction to Apache Solr
Apache Solr is an open-source search server. SOLR tasks depend on the full-text search engine known as Apache Lucene. In simple words SOLR is an HTTP wrapper along with an inverted index that is offered by the Lucene. The inverted index can be defined as a list of words and each word- entry links to the documents where it exists. The SOLR had been used in many of the enterprise projects. There is no need for Java code for SOLR in enterprise projects, even though Java itself has to be installed.
Installation of Apache Solr
Apache Solr installation is suitable in the JRE (Java runtime environment)
Check whether Java is installed on your system using the below command
$ java -version
If installed, you can see the below output.
java version “1.7.0_55”
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Else, download and install the Java software from the following link:
And, download the Solr from below link.
Steps to install the Apache Solr.
- You can unload the Solr distribution to your preferred
- Stop the Java servlet container.
- Copy the solr.war file from the Solr distribution to the web apps directory of our servlet container .
- Copy the Solr Home directory solr-4.x.0/example/solr/ from the distribution to our preferred Solr Home location.
- Start our servlet container, passing to it the location of our Solr Home in one of these ways:
- Set the Java system property solr.solr.home to our Solr Home.
- Configure the servlet container so that a JNDI lookup of java:comp/env/solr/home by the Solr webapp will point to our Solr Home.
- Start the servlet container in the directory containing ./solr: the default Solr Home is solr under the JVM’s current working directory ($CWD/solr).
Do you want to become a Solr Expert? Enhance your knowledge of Solr by enrolling in Intellipaat’s Solr Training!
Steps to run the Solr:
1.Start the server by using this command
$ java -jar start.jar
2.Start the web server
C:\Applications\Solr\example > start.bat
3. Check the solr with the following URL on the browser.