You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Steven White <sw...@gmail.com> on 2015/05/11 14:21:22 UTC

SolrJ vs. plain old HTTP post

Hi Everyone,

If all that I need to do is send data to Solr to add / delete a Solr
document, which tool is better for the job: SolrJ or plain old HTTP post?

In other word, what are the advantages of using SolrJ when the need is to
push data to Solr for indexing?

Thanks,

Steve

Re: SolrJ vs. plain old HTTP post

Posted by Steven White <sw...@gmail.com>.
Thanks Shalin and all for helping with this question.  It is much
appreciated.

Steve

On Tue, May 12, 2015 at 1:24 AM, Shalin Shekhar Mangar <
shalinmangar@gmail.com> wrote:

> On Mon, May 11, 2015 at 8:20 PM, Steven White <sw...@gmail.com>
> wrote:
>
> > Thanks Erik and Emir.
> >
> > <snip/>
>
> >
> > To close the loop on this question, I will need to enable Jetty's SSL
> (the
> > jetty that comes with Solr 5.1).  If I do so, will SolrJ still work, can
> I
> > assume that SolrJ supports SSL?
> >
> >
> Yes, SolrJ can work with SSL enabled on the server as long as you pass the
> same JVM parameters on the client side to enable SSL e.g.
>
> -Djavax.net.ssl.keyStore=
> -Djavax.net.ssl.keyStorePassword=
> -Djavax.net.ssl.trustStore=
> -Djavax.net.ssl.trustStorePassword=
>
> See
>
> https://cwiki.apache.org/confluence/display/solr/Enabling+SSL#EnablingSSL-IndexadocumentusingCloudSolrClient
>
>
> > I Google'ed but cannot find the answer.
> >
> > Thanks again.
> >
> > Steve
> >
> > On Mon, May 11, 2015 at 8:39 AM, Erik Hatcher <er...@gmail.com>
> > wrote:
> >
> > > Another advantage to SolrJ is with SolrCloud (ZK) awareness, and taking
> > > advantage of some routing optimizations client-side so the cluster has
> > less
> > > hops to make.
> > >
> > > —
> > > Erik Hatcher, Senior Solutions Architect
> > > http://www.lucidworks.com <http://www.lucidworks.com/>
> > >
> > >
> > >
> > >
> > > > On May 11, 2015, at 8:21 AM, Steven White <sw...@gmail.com>
> > wrote:
> > > >
> > > > Hi Everyone,
> > > >
> > > > If all that I need to do is send data to Solr to add / delete a Solr
> > > > document, which tool is better for the job: SolrJ or plain old HTTP
> > post?
> > > >
> > > > In other word, what are the advantages of using SolrJ when the need
> is
> > to
> > > > push data to Solr for indexing?
> > > >
> > > > Thanks,
> > > >
> > > > Steve
> > >
> > >
> >
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>

Re: SolrJ vs. plain old HTTP post

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Mon, May 11, 2015 at 8:20 PM, Steven White <sw...@gmail.com> wrote:

> Thanks Erik and Emir.
>
> <snip/>

>
> To close the loop on this question, I will need to enable Jetty's SSL (the
> jetty that comes with Solr 5.1).  If I do so, will SolrJ still work, can I
> assume that SolrJ supports SSL?
>
>
Yes, SolrJ can work with SSL enabled on the server as long as you pass the
same JVM parameters on the client side to enable SSL e.g.

-Djavax.net.ssl.keyStore=
-Djavax.net.ssl.keyStorePassword=
-Djavax.net.ssl.trustStore=
-Djavax.net.ssl.trustStorePassword=

See
https://cwiki.apache.org/confluence/display/solr/Enabling+SSL#EnablingSSL-IndexadocumentusingCloudSolrClient


> I Google'ed but cannot find the answer.
>
> Thanks again.
>
> Steve
>
> On Mon, May 11, 2015 at 8:39 AM, Erik Hatcher <er...@gmail.com>
> wrote:
>
> > Another advantage to SolrJ is with SolrCloud (ZK) awareness, and taking
> > advantage of some routing optimizations client-side so the cluster has
> less
> > hops to make.
> >
> > —
> > Erik Hatcher, Senior Solutions Architect
> > http://www.lucidworks.com <http://www.lucidworks.com/>
> >
> >
> >
> >
> > > On May 11, 2015, at 8:21 AM, Steven White <sw...@gmail.com>
> wrote:
> > >
> > > Hi Everyone,
> > >
> > > If all that I need to do is send data to Solr to add / delete a Solr
> > > document, which tool is better for the job: SolrJ or plain old HTTP
> post?
> > >
> > > In other word, what are the advantages of using SolrJ when the need is
> to
> > > push data to Solr for indexing?
> > >
> > > Thanks,
> > >
> > > Steve
> >
> >
>



-- 
Regards,
Shalin Shekhar Mangar.

Re: SolrJ vs. plain old HTTP post

Posted by Steven White <sw...@gmail.com>.
Thanks Erik and Emir.

Erik: The fact that SolrJ is aware of SolrCloud is enough to put it over
plain old HTTP post.

Emir: I looked into Solr's data import handler, unfortunately, it won't
work for my need.

To close the loop on this question, I will need to enable Jetty's SSL (the
jetty that comes with Solr 5.1).  If I do so, will SolrJ still work, can I
assume that SolrJ supports SSL?

I Google'ed but cannot find the answer.

Thanks again.

Steve

On Mon, May 11, 2015 at 8:39 AM, Erik Hatcher <er...@gmail.com>
wrote:

> Another advantage to SolrJ is with SolrCloud (ZK) awareness, and taking
> advantage of some routing optimizations client-side so the cluster has less
> hops to make.
>
> —
> Erik Hatcher, Senior Solutions Architect
> http://www.lucidworks.com <http://www.lucidworks.com/>
>
>
>
>
> > On May 11, 2015, at 8:21 AM, Steven White <sw...@gmail.com> wrote:
> >
> > Hi Everyone,
> >
> > If all that I need to do is send data to Solr to add / delete a Solr
> > document, which tool is better for the job: SolrJ or plain old HTTP post?
> >
> > In other word, what are the advantages of using SolrJ when the need is to
> > push data to Solr for indexing?
> >
> > Thanks,
> >
> > Steve
>
>

Re: SolrJ vs. plain old HTTP post

Posted by Erik Hatcher <er...@gmail.com>.
Another advantage to SolrJ is with SolrCloud (ZK) awareness, and taking advantage of some routing optimizations client-side so the cluster has less hops to make.

—
Erik Hatcher, Senior Solutions Architect
http://www.lucidworks.com <http://www.lucidworks.com/>




> On May 11, 2015, at 8:21 AM, Steven White <sw...@gmail.com> wrote:
> 
> Hi Everyone,
> 
> If all that I need to do is send data to Solr to add / delete a Solr
> document, which tool is better for the job: SolrJ or plain old HTTP post?
> 
> In other word, what are the advantages of using SolrJ when the need is to
> push data to Solr for indexing?
> 
> Thanks,
> 
> Steve


Re: SolrJ vs. plain old HTTP post

Posted by Emir Arnautovic <em...@sematext.com>.
Hi Steve,
Main advantage is that it uses binary format so XML/JSON overhead is 
avoided.

You should also check out if SOLR's Data Import Handler is good fit for you.

Thanks,
Emir

--
Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/


On 11.05.2015 14:21, Steven White wrote:
> Hi Everyone,
>
> If all that I need to do is send data to Solr to add / delete a Solr
> document, which tool is better for the job: SolrJ or plain old HTTP post?
>
> In other word, what are the advantages of using SolrJ when the need is to
> push data to Solr for indexing?
>
> Thanks,
>
> Steve
>