300x250 AD TOP

Powered by Blogger.

Thursday, 12 June 2014

Tagged under: ,

How To Solr Server


You can download solr server from the following link

http://lucene.apache.org/solr/downloads.html


once downloaded extract and place it into your virtual machine. Move into the Solr folder and you'll see some useful readme files. you should read them first time you get.

To start up a quick up and running server go into the example directory
open terminal and execute the command

java -jar start.jar

now you should be able to see the Solr interface at
http://localhost:8983/solr/

To index a pdf document using the post.jar that is already provided in the Solr distribution move into example docs folder

The post.jar utility is not meant for production use, but as a convenience tool for experimenting with Solr.

Open a new terminal and execute the following command.
this command uses ExtractingRequestHandler aka Solr Cell project

java -Durl=http://localhost:8983/solr/update/extract -Dparams=literal.id=doc5 -Dtype=text/pdf -jar post.jar SQA.pdf

Note you should have the file SQA.pdf in the exampledocs directory.
you should see an output like this:
SimplePostTool version 1.5
Posting files to base url http://localhost:8983/solr/update/extract?literal.id=doc5 using content-type text/pdf..
POSTing file SQA.pdf
1 files indexed.
COMMITting Solr index changes to http://localhost:8983/solr/update/extract?literal.id=doc5..
Time spent: 0:00:06.259

you should continue to read here


To query the Solr Server you should go to this url
http://localhost:8983/solr/#/collection1/query


0 comments:

Post a Comment