Solr overview & Setup


Solr Overview


Solr is an open source software developed by Apache software foundation
It is a search server which uses the Apache Lucene in the backend and provides a Rest API which can be called from any language or the platform to get the indexed data or the search results.

Apache Lucene is the java library which provides indexing and search functionality.

Solr and Lucene both are managed by Apache.

Applications can use this search platform called solr to implement faster searching in their site.

Download and setup the Solr server


We can download solr from the below url
Click here to download Solr

Solr download home page

Click on highlighed link in the above image

Solr download Zip page
Select solr zip folder from this page for downloading.

Once download completes,Unzip the zipped folder

Installing Java

We must have Java installed on the machine to work with Solr(Because Solr is developed in Java)

So if not please install JDK 8 from the below url

Click here to download JDK


How to start solr server ?

Open command prompt and go to the bin folder of solr unzipped directory in your system

if you are in any other drive, switch to the drive where solr is downloaded using the command Drive: example E: to switch to E drive.

In my system , I have Solr downloaded in E drive.

cd E:\softwares\solr-6.2.0\bin

Run the below command

Solr start

Now it displays that solr server is started as below
Solr start command window output

We can also verify it by accessing it in the web using below url

http://localhost:8983/

Solr start web verify


How to stop Solr server ?

Run the below command to stop it

solr stop –p 8983

OR

solr stop -all

Now Solr server is stopped

Now try to access the below url

http://localhost:8983/

It will say, cannot be connected as solr server is stopped.

Know Solr status

We can also run the below command to get the status of Solr server

Solr status

It will display the following message which indicates that Solr is stopped.

No running Solr nodes found.

About the Author

Karibasappa G C (KB)
Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on