Warmers do not load field data cache for sorting on new segments

fixes #2649
This commit is contained in:
Shay Banon 2013-02-13 17:51:18 +01:00
parent f41eccc7a5
commit 681239b413
1 changed files with 2 additions and 1 deletions

View File

@ -639,7 +639,8 @@ public class SearchService extends AbstractLifecycleComponent<SearchService> {
SearchContext context = null; SearchContext context = null;
try { try {
long now = System.nanoTime(); long now = System.nanoTime();
ShardSearchRequest request = new ShardSearchRequest(indexShard.shardId().index().name(), indexShard.shardId().id(), indexMetaData.numberOfShards(), SearchType.COUNT) ShardSearchRequest request = new ShardSearchRequest(indexShard.shardId().index().name(), indexShard.shardId().id(), indexMetaData.numberOfShards(),
SearchType.QUERY_THEN_FETCH /* we don't use COUNT so sorting will also kick in whatever warming logic*/)
.source(entry.source()) .source(entry.source())
.types(entry.types()); .types(entry.types());
context = createContext(request, warmerContext.newSearcher()); context = createContext(request, warmerContext.newSearcher());