I am writing a simple query that works fine in curl but blows up when using solrj. Please help...
curl stmt:
curl "http:开发者_JAVA技巧//ec2-50-19-33-143.compute-1.amazona/solr/Sharecare_User/select?q=firstName:Blah"
Java code:
solrServer.setBaseURL(solrServer.getBaseURL() + "/Sharecare_User");
SolrQuery solrQuery = new SolrQuery();
solrQuery.setQuery("firstName:Blah");
QueryResponse rsp = null;
try {
rsp = solrServer.query(solrQuery);
} catch (SolrServerException e) {
e.printStackTrace();
}
and finally the error:
Internal Server Error
request: http://ec2-50-19-33-143.compute-1.amazonaws.com:8098/solr/Sharecare_User/select?q=firstName:Blah&wt=javabin&version=2
The port is missing in curl, could you be using different ports? Could you show what the curl is getting?
精彩评论