solrj 查询不起作用
我正在编写一个简单的查询,该查询在curl中运行良好,但在使用solrj时会崩溃。 请帮助...
curl stmt:
curl "http://ec2-50-19-33-143.compute-1.amazona/solr/Sharecare_User/select?q=firstName:Blah"
Java代码:
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();
}
最后出现错误:
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
I am writing a simple query that works fine in curl but blows up when using solrj.
Please help...
curl stmt:
curl "http://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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
curl 中缺少端口,您可以使用不同的端口吗?
你能展示一下卷曲得到了什么吗?
The port is missing in curl, could you be using different ports?
Could you show what the curl is getting?