Since it is returning a 404, I guess the real time get handler is not
enabled on your remote Solr.
Make sure that your solrconfig.xml has the following somewhere:
requestHandler name=/get class=solr.RealTimeGetHandler
lst name=defaults
str name=omitHeadertrue/str
str name=wtjson/str
str name=indenttrue/str
/lst
/requestHandler
On Sat, Jun 7, 2014 at 1:41 AM, Songtao Zheng zhengsongtaon...@gmail.com
wrote:
Solr version on remote server: solr-4.3.1 I am trying to use Solr Realtime
Get http://wiki.apache.org/solr/RealTimeGet to retrieve document before
commit. My code
class Test3
{
static main(args)
{
def test = new Test3()
test.run()
}
private run()
{
String url = DEV_SERVER:8983/solr/emr
HttpSolrServer solr = new HttpSolrServer(url)
SolrQuery q = new SolrQuery();
q.setRequestHandler(/get);
q.set(rid,
6662c0f2.ee6a64fe.588j6qohe.9kd087u.0r00dg.6kr5pc2as0qu9m4ibr7f7);
QueryRequest req = new QueryRequest(q);
req.setResponseParser(new BinraryResponseParser());
println ==
rsp = req.process(solr);// ERROR
}
}
*The error stacktrace is:*
Caught:
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:
Expected mime type application/octet-stream but got
text/html. html
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/
titleError 404 Not Found/title
/head
bodyh2HTTP ERROR 404/h2
pProblem accessing /solr/emr/get. Reason:
preNot Found/pre/phr /ismallPowered by
Jetty:///small/ibr/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
/body
/html
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:
Expected mime type application/octet-stream but got text/htm
l. html
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/
titleError 404 Not Found/title
/head
bodyh2HTTP ERROR 404/h2
pProblem accessing /solr/emr/get. Reason:
preNot Found/pre/phr /ismallPowered by
Jetty:///small/ibr/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
/body
/html
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:459)
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:199)
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:91)
at
org.apache.solr.client.solrj.request.QueryRequest$process.call(Unknown
Source)
at com.att.songtao.test.Test3.run(Test3.groovy:48)
at com.att.songtao.test.Test3.this$2$run(Test3.groovy)
at com.att.songtao.test.Test3$this$2$run.call(Unknown Source)
at com.att.songtao.test.Test3.main(Test3.groovy:14)
I am following Realtime Get document and added updateLog to updateHandler
in solrconfig.xml. My localhost localhost:8983/solr/emr (version
solr-4.7.2) Realtime Get works perfect, but having it on remote server
throws out the above error.
Anyone could provide the insight?
Thanks,
Songtao
--
Regards,
Shalin Shekhar Mangar.