On 5/11/2013 8:26 AM, Michael Sokolov wrote: > try { > httpServer.request(new > DirectXmlRequest("/admin.html", "")); > httpServer.setRequestWriter(new > BinaryRequestWriter()); > } catch (SolrException e) { > // There is a backwards-compatibility issue > w/javabin; use XML for now > // assume this is a 404 ?? > getLogger().warn("Could not load /admin.html; > assuming this is a < 4.0 server, we won't use javabin format"); > } ... > > I don't know if this is really an ideal detection mechanism. Probably > this could be done better in Solr/J code somewhere. At the very least > there should be warnings in release notes and on the Wiki. If > somebody grants me access to the wiki, I'd be happy to write something > there to let people know about this issue.
That looks like a reasonable way to go, I'll give it a try. I do wonder if there are any known "pure SolrJ" calls that will fail against a 3.x server but not fail against a 4.x server, but I don't think there's anything wrong with the way you've done it. If the problem can be fixed within SolrJ so the app developer doesn't have to worry about it at all, that would be the best way to go. I found SOLR-3038 and put in my two cents. I'm a little bit amused by my own earlier comment on that issue, where I say that I'm not a java programmer. It was completely true at the time. Now it's only a little bit true. :) Thanks, Shawn