开发者

solrj query is not working

开发者 https://www.devze.com 2023-03-09 15:08 出处:网络
I am writing a simple query that works fine in curl but blows up when using solrj. Please help... curl stmt:

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号