org.elasticsearch.indices.IndicesService.canCache()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.elasticsearch.indices.IndicesService.canCache()方法的一些代码示例,展示了IndicesService.canCache()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IndicesService.canCache()方法的具体详情如下:
包路径:org.elasticsearch.indices.IndicesService
类名称:IndicesService
方法名:canCache

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();

相关文章

微信公众号

最新文章

更多