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 Mark Bennett <mb...@ideaeng.com> on 2013/01/03 20:24:07 UTC
Force SolrJ 4.0.0 to use XML to talk to Solr 1.4.1 server
I know I've seen this before, but I'll be darned if I can find it on Google.
I have a SolrJ app that normally submits data to Solr 4.x. But sometimes
it needs to submit to 1.4.1 for reasons I won't go in to.
I'd like to stick with the 4.x jar files, but still submit to 1.x, and my
understanding was that this was possible if using XML.
--
Mark Bennett / New Idea Engineering, Inc. / mbennett@ideaeng.com
Direct: 408-733-0387 / Main: 866-IDEA-ENG / Cell: 408-829-6513
Re: Force SolrJ 4.0.0 to use XML to talk to Solr 1.4.1 server
Posted by Mark Bennett <mb...@ideaeng.com>.
Thank you Sean for the option.
Your second post made me smile!
--
Mark Bennett / New Idea Engineering, Inc. / mbennett@ideaeng.com
Direct: 408-733-0387 / Main: 866-IDEA-ENG / Cell: 408-829-6513
On Thu, Jan 3, 2013 at 12:21 PM, Shawn Heisey <so...@elyograg.org> wrote:
> On 1/3/2013 12:39 PM, Shawn Heisey wrote:
>
>> This should work:
>>
>> server.setParser(new XMLResponseParser());
>>
>
> Additional note, because I seem to have trouble getting this through the
> heads of the developers in my organization. Mark, this is not directed at
> you, I just feel it may need saying in general:
>
> Setting server options only needs to happen once, after you first create
> the server object. It does not need to happen before every query.
> Additionally, you usually only need one server object for your entire
> application. If you are talking to multiple Solr servers or multiple Solr
> cores, then you need multiple objects.
>
> Thanks,
> Shawn
>
>
Re: Force SolrJ 4.0.0 to use XML to talk to Solr 1.4.1 server
Posted by Shawn Heisey <so...@elyograg.org>.
On 1/3/2013 12:39 PM, Shawn Heisey wrote:
> This should work:
>
> server.setParser(new XMLResponseParser());
Additional note, because I seem to have trouble getting this through the
heads of the developers in my organization. Mark, this is not directed
at you, I just feel it may need saying in general:
Setting server options only needs to happen once, after you first create
the server object. It does not need to happen before every query.
Additionally, you usually only need one server object for your entire
application. If you are talking to multiple Solr servers or multiple
Solr cores, then you need multiple objects.
Thanks,
Shawn
Re: Force SolrJ 4.0.0 to use XML to talk to Solr 1.4.1 server
Posted by Shawn Heisey <el...@elyograg.org>.
On 1/3/2013 12:24 PM, Mark Bennett wrote:
> I know I've seen this before, but I'll be darned if I can find it on Google.
>
> I have a SolrJ app that normally submits data to Solr 4.x. But sometimes
> it needs to submit to 1.4.1 for reasons I won't go in to.
>
> I'd like to stick with the 4.x jar files, but still submit to 1.x, and my
> understanding was that this was possible if using XML.
This should work:
server.setParser(new XMLResponseParser());