本文整理了Java中org.elasticsearch.client.RestHighLevelClient.clearScroll
方法的一些代码示例,展示了RestHighLevelClient.clearScroll
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RestHighLevelClient.clearScroll
方法的具体详情如下:
包路径:org.elasticsearch.client.RestHighLevelClient
类名称:RestHighLevelClient
方法名:clearScroll
[英]Clears one or more scroll ids using the Clear Scroll API. See Clear Scroll API on elastic.co
[中]
代码示例来源:origin: spring-projects/spring-data-elasticsearch
@Override
public void clearScroll(String scrollId) {
ClearScrollRequest request = new ClearScrollRequest();
request.addScrollId(scrollId);
try {
// TODO: Something useful with the response.
ClearScrollResponse response = client.clearScroll(request);
} catch (IOException e) {
throw new ElasticsearchException("Error for search request with scroll: " + request.toString(), e);
}
}
代码示例来源:origin: org.nuxeo.elasticsearch/nuxeo-elasticsearch-core
@Override
public ClearScrollResponse clearScroll(ClearScrollRequest request) {
try {
if (log.isDebugEnabled()) {
log.debug(String.format("Clearing scroll ids: %s", Arrays.toString(request.getScrollIds().toArray())));
}
return client.clearScroll(request, RequestOptions.DEFAULT);
} catch (ElasticsearchStatusException e) {
if (RestStatus.NOT_FOUND.equals(e.status())) {
if (log.isDebugEnabled()) {
log.debug(String.format("Scroll ids not found, they have certainly been already closed: %s",
Arrays.toString(request.getScrollIds().toArray())));
}
return new ClearScrollResponse(true, 0);
}
throw new NuxeoException(e);
} catch (IOException e) {
throw new NuxeoException(e);
}
}
代码示例来源:origin: eea/eea.elasticsearch.river.rdf
ClearScrollResponse clearScrollResponse = client.clearScroll(clearScrollRequest);
boolean succeeded = clearScrollResponse.isSucceeded();
} catch (IOException e) {
代码示例来源:origin: eea/eea.elasticsearch.river.rdf
ClearScrollResponse clearScrollResponse = client.clearScroll(clearScrollRequest);
boolean succeeded = clearScrollResponse.isSucceeded();
} catch (IOException e) {
内容来源于网络,如有侵权,请联系作者删除!