本文整理了Java中org.elasticsearch.indices.IndicesService.canCache()
方法的一些代码示例,展示了IndicesService.canCache()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IndicesService.canCache()
方法的具体详情如下:
包路径:org.elasticsearch.indices.IndicesService
类名称:IndicesService
方法名:canCache
[英]Can the shard request be cached at all?
[中]是否可以缓存碎片请求?
代码示例来源:origin: org.elasticsearch/elasticsearch
/**
* Try to load the query results from the cache or execute the query phase directly if the cache cannot be used.
*/
private void loadOrExecuteQueryPhase(final ShardSearchRequest request, final SearchContext context) throws Exception {
final boolean canCache = indicesService.canCache(request, context);
context.getQueryShardContext().freezeContext();
if (canCache) {
indicesService.loadIntoContext(request, context, queryPhase);
} else {
queryPhase.execute(context);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
assert canCache(request, context);
final DirectoryReader directoryReader = context.searcher().getDirectoryReader();
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
/**
* Try to load the query results from the cache or execute the query phase directly if the cache cannot be used.
*/
private void loadOrExecuteQueryPhase(final ShardSearchRequest request, final SearchContext context) throws Exception {
final boolean canCache = indicesService.canCache(request, context);
context.getQueryShardContext().freezeContext();
if (canCache) {
indicesService.loadIntoContext(request, context, queryPhase);
} else {
queryPhase.execute(context);
}
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
/**
* Try to load the query results from the cache or execute the query phase directly if the cache cannot be used.
*/
private void loadOrExecuteQueryPhase(final ShardSearchRequest request, final SearchContext context) throws Exception {
final boolean canCache = indicesService.canCache(request, context);
context.getQueryShardContext().freezeContext();
if (canCache) {
indicesService.loadIntoContext(request, context, queryPhase);
} else {
queryPhase.execute(context);
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Try to load the query results from the cache or execute the query phase directly if the cache cannot be used.
*/
private void loadOrExecuteQueryPhase(final ShardSearchRequest request, final SearchContext context) throws Exception {
final boolean canCache = indicesService.canCache(request, context);
context.getQueryShardContext().freezeContext();
if (canCache) {
indicesService.loadIntoContext(request, context, queryPhase);
} else {
queryPhase.execute(context);
}
}
代码示例来源:origin: apache/servicemix-bundles
assert canCache(request, context);
final DirectoryReader directoryReader = context.searcher().getDirectoryReader();
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
assert canCache(request, context);
final DirectoryReader directoryReader = context.searcher().getDirectoryReader();
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
assert canCache(request, context);
final DirectoryReader directoryReader = context.searcher().getDirectoryReader();
内容来源于网络,如有侵权,请联系作者删除!