SolrJ 4.3 to Solr 1.4
So, trying to use a SolrJ 4.3 to talk to an old Solr 1.4. Specifically to add documents. The wiki at http://wiki.apache.org/solr/Solrj suggests, I think, that this should work, so long as you: server.setParser(new XMLResponseParser()); However, when I do this, I still get a org.apache.solr.common.SolrException: parsing error from org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:143) (If I _don't_ setParser to XML, and use the binary parser... I get a fully expected error about binary format corruption -- that part is expected and I understand it, that's why you have to use the XMLResponseParser instead). Am I not doing enough to my SolrJ 4.3 to get it to talk to the Solr 1.4 server in pure XML? I've set the parser to the XMLResponseParser, do I also have to somehow tell it to actually use the Solr 1.4 XML update handler or something? I don't entirely understand what I'm talking about. Alternately... is it just a lost cause trying to get SolrJ 4.3 to talk to Solr 1.4, is the wiki wrong that this is possible? Thanks for any help, Jonathan
Re: SolrJ 4.3 to Solr 1.4
: However, when I do this, I still get a org.apache.solr.common.SolrException: : parsing error from : org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:143) it's impossible to guess what the underlying problem might be unless you can provide us the full error. The one thing i can think of that might not be obvious is that legacy header format (quey param version=1.0 vs version=2.0) might be confusing the XMLResponseParser ... i don't remember when the default changed but i thought it was *before* Solr 1.4 https://wiki.apache.org/solr/XMLResponseFormat#A.27version.27 -Hoss
Re: SolrJ 4.3 to Solr 1.4
Huh, that might have been a false problem of some kind. At the moment, it looks like I _do_ have my SolrJ 4.3 succesfully talking to a Solr 1.4, so long as I setParser(new XMLResponseParser()). Not sure what I changed or what wasn't working before, but great! So nevermind. Although if anyone reading this wants to share any other potential gotchas on solrj 4.3 talking to solr 1.4, feel free! On 7/11/13 4:24 PM, Jonathan Rochkind wrote: So, trying to use a SolrJ 4.3 to talk to an old Solr 1.4. Specifically to add documents. The wiki at http://wiki.apache.org/solr/Solrj suggests, I think, that this should work, so long as you: server.setParser(new XMLResponseParser()); However, when I do this, I still get a org.apache.solr.common.SolrException: parsing error from org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:143) (If I _don't_ setParser to XML, and use the binary parser... I get a fully expected error about binary format corruption -- that part is expected and I understand it, that's why you have to use the XMLResponseParser instead). Am I not doing enough to my SolrJ 4.3 to get it to talk to the Solr 1.4 server in pure XML? I've set the parser to the XMLResponseParser, do I also have to somehow tell it to actually use the Solr 1.4 XML update handler or something? I don't entirely understand what I'm talking about. Alternately... is it just a lost cause trying to get SolrJ 4.3 to talk to Solr 1.4, is the wiki wrong that this is possible? Thanks for any help, Jonathan
Re: SolrJ 4.3 to Solr 1.4
On 7/11/2013 2:24 PM, Jonathan Rochkind wrote: (If I _don't_ setParser to XML, and use the binary parser... I get a fully expected error about binary format corruption -- that part is expected and I understand it, that's why you have to use the XMLResponseParser instead). Am I not doing enough to my SolrJ 4.3 to get it to talk to the Solr 1.4 server in pure XML? I've set the parser to the XMLResponseParser, do I also have to somehow tell it to actually use the Solr 1.4 XML update handler or something? I don't entirely understand what I'm talking about. From everything I understand, it should be possible to make this work. For XML updates, the handler should be /update on both 1.4 and 4.x. There might be some additional steps that need to be taken, but without more info I'm not sure what those steps might be. Is there more to the client-side exception? Do you see anything in the server-side logs? If your server is logging at INFO, you should hopefully be able to see some of the actual request. Can you share a larger snippet of your SolrJ code? Thanks, Shawn