{
"query" : {
"term" : {
"url" : {
"value" : "http://www.xinhuanet.com/info/ ... ot%3B,
"boost" : 1.0
}
}
},
"sort" : [
{
"createDate" : {
"order" : "desc"
}
}
]
}
java api 访问多了就抛如下错误
NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{lKS_PSd5QfqZsTvMlRv8AA}{127.0.0.1}{127.0.0.1:9302}]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:347)
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:245)
at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59)
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:363)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)
at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:62)
at com.xhgk.spider.spider.servlet.DataService.existsByUrl(DataService.java:244)
at com.xhgk.spider.spider.servlet.Helper.existsByUrl(Helper.java:330)
at com.xhgk.spider.spider.servlet.UrlConsumer.recursionUrl(UrlConsumer.java:93)
at com.xhgk.spider.spider.servlet.UrlConsumer.recursionUrl(UrlConsumer.java:106)
at com.xhgk.spider.spider.servlet.UrlConsumer.run(UrlConsumer.java:46)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
1 个回复
JackGe
赞同来自: