Solr: This is the Lucene based search api. Solr is open source enterprise search platform and written in Java, It provides the fast search with simple search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search…. and much more. You can find the more detail here .

jdk 1.7 or greater

Download from apache official website SOLR. Unzip the SOLR release and save ourselves in working directory.

amit_anand@amit:~$ unzip -q 
amit_anand@amit:~$ cd solr-4.10.1/

We can run any Java servlet container, but SOLR release version contain jetty server and some examples so we can run SOLR sample application on the jetty.

amit_anand@amit:~/solr-4.10.1/example$ java -jar start.jar
0    [main] INFO  org.eclipse.jetty.server.Server  – jetty-8.1.10.v20130312
54   [main] INFO  org.eclipse.jetty.deploy.providers.ScanningAppProvider  – Deployment monitor /home/amit_anand/solr-4.10.1/example/contexts at interval 0
81   [main] INFO  org.eclipse.jetty.deploy.DeploymentManager  – Deployable added: /home/amit_anand/solr-4.10.1/example/contexts/solr-jetty-context.xml
147  [main] INFO  org.eclipse.jetty.webapp.WebInfConfiguration  – Extract jar:file:/home/amit_anand/solr-4.10.1/example/webapps/solr.war!/ to /home/amit_anand/solr-4.10.1/example/solr-webapp/webapp

Now we can hit the http://localhost:8983/solr/ url in our browser and we can see our SOLR administration console on GUI mode

Indexing Data:
We can send all sample data using wild card like *.xml etc., In the example folder there is some sample xml file so we can use these sample files as an indexing data:

amit_anand@amit:~/solr-4.10.1/example/exampledocs$ java -jar post.jar *.xml

Now our SOLR application is ready to give us search results.

In this query we can change the format like json, python, xml, ruby, php, csv.