How to use Solr in java program

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use Solr in java program

khirb7
Hi every body
I am new user of Solr and I want to know how can I use Solr in my own java program, what are the different possibilities of using solr. Is a web servlet  container is  ncessary to run and use Solr, Is servlet Container as Tomcat is enough to use  all the power offered by solr. I heard about the possiblity of using Solr as web service is it the best way and especially if a program is  written in another language than JAVA.
please help me.
Any reply is welcome and thank you.
Reply | Threaded
Open this post in threaded view
|

Re: How to use Solr in java program

hossman

: I am new user of Solr and I want to know how can I use Solr in my own java

http://wiki.apache.org/solr/SolJava

: program, what are the different possibilities of using solr. Is a web
: servlet  container is  ncessary to run and use Solr, Is servlet Container as
: Tomcat is enough to use  all the power offered by solr. I heard about the
: possiblity of using Solr as web service is it the best way and especially if
: a program is  written in another language than JAVA.

I recommend using Solr as a webservice, even if your client is Java.  but
there are options for embedding Solr directly into your applications using
SolrJ.





-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: How to use Solr in java program

khirb7
hossman wrote
: I am new user of Solr and I want to know how can I use Solr in my own java

http://wiki.apache.org/solr/SolJava

: program, what are the different possibilities of using solr. Is a web
: servlet  container is  ncessary to run and use Solr, Is servlet Container as
: Tomcat is enough to use  all the power offered by solr. I heard about the
: possiblity of using Solr as web service is it the best way and especially if
: a program is  written in another language than JAVA.

I recommend using Solr as a webservice, even if your client is Java.  but
there are options for embedding Solr directly into your applications using
SolrJ.





-Hoss
thank you hossman for your response,I have another question : I have writen a small java program using sockets to send an http query  to solr which is running under tomcat then I got a response in xml format is  
that an example of using it as Web services since the the comminication is based on http/xml ; or using tools such Axis is mondatory to talk about web services (or Solr in it self by its behaviour is a web service).

thank you in advance.
Reply | Threaded
Open this post in threaded view
|

Re: How to use Solr in java program

hossman

: > I recommend using Solr as a webservice, even if your client is Java.  but
: > there are options for embedding Solr directly into your applications using

: thank you hossman for your response,I have another question : I have writen
: a small java program using sockets to send an http query  to solr which is
: running under tomcat then I got a response in xml format is  
: that an example of using it as Web services since the the comminication is
: based on http/xml ; or using tools such Axis is mondatory to talk about web
: services (or Solr in it self by its behaviour is a web service).

semantics are either wonderful or horrible - depending on perspective. to
some people, the term "webservice" has a *very* specific meaning, i
however was just using it in the more relaxed sense of communicating over
HTTP - so yes, you understood my meaning.

But really: opening your own raw Socket to do hte HTTP communication is
one level lower then anyone should ever consider coding.  it's HTTP,
there are lots of libraries that will take care of the nitty gritty
details for you and make your life easier.

Like i said before: look at the wiki, try out SolrJ, it should make your
life much easier.



-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: How to use Solr in java program

khirb7
hossman wrote
: > I recommend using Solr as a webservice, even if your client is Java.  but
: > there are options for embedding Solr directly into your applications using

: thank you hossman for your response,I have another question : I have writen
: a small java program using sockets to send an http query  to solr which is
: running under tomcat then I got a response in xml format is  
: that an example of using it as Web services since the the comminication is
: based on http/xml ; or using tools such Axis is mondatory to talk about web
: services (or Solr in it self by its behaviour is a web service).

semantics are either wonderful or horrible - depending on perspective. to
some people, the term "webservice" has a *very* specific meaning, i
however was just using it in the more relaxed sense of communicating over
HTTP - so yes, you understood my meaning.

But really: opening your own raw Socket to do hte HTTP communication is
one level lower then anyone should ever consider coding.  it's HTTP,
there are lots of libraries that will take care of the nitty gritty
details for you and make your life easier.

Like i said before: look at the wiki, try out SolrJ, it should make your
life much easier.



-Hoss
Thank you Hossman for your reply, now I see solr differently and clearly; i will try the  SolrJ.