I have Solr deployed in Jelastic with Jetty. Its admin page can be accessed with the URL:
http://mydomain.jelastic.servint.net/solr
But when I try to add a document from another machine like this:
String urlString = "http://mydomain.jelastic.servint.net/solr";
SolrServer solr = new HttpSolrServer(urlString);
SolrInputDocument document = new SolrInputDocument();
document.addField("id", "552199");
document.addField("name", "Gouda cheese wheel cheese");
UpdateRequest req = new UpdateRequest();
req.add(document);
UpdateResponse response = req.process(solr);
It does not work. I am getting the following error:
org.apache.solr.common.SolrException: Server at http://mydomain.jelastic.servint.net/solr returned non ok status:411, message:Length Required
If I use a fake URL it returns the same error, so I think the root cause must be a problem with the URL.
It works fine accessing Solr at the same machine.
Could anybody give me a hand?