|
|
@@ -290,7 +290,7 @@ public class IndicesQueryCacheTests extends ESTestCase {
|
|
|
w1.close();
|
|
|
ShardId shard1 = new ShardId("index", "_na_", 0);
|
|
|
r1 = ElasticsearchDirectoryReader.wrap(r1, shard1);
|
|
|
- IndexSearcher s1 = newSearcher(r1);
|
|
|
+ IndexSearcher s1 = newSearcher(r1, false);
|
|
|
s1.setQueryCachingPolicy(TrivialQueryCachingPolicy.ALWAYS);
|
|
|
|
|
|
Directory dir2 = newDirectory();
|
|
|
@@ -300,7 +300,7 @@ public class IndicesQueryCacheTests extends ESTestCase {
|
|
|
w2.close();
|
|
|
ShardId shard2 = new ShardId("index", "_na_", 1);
|
|
|
r2 = ElasticsearchDirectoryReader.wrap(r2, shard2);
|
|
|
- IndexSearcher s2 = newSearcher(r2);
|
|
|
+ IndexSearcher s2 = newSearcher(r2, false);
|
|
|
s2.setQueryCachingPolicy(TrivialQueryCachingPolicy.ALWAYS);
|
|
|
|
|
|
Settings settings = Settings.builder()
|
|
|
@@ -375,7 +375,7 @@ public class IndicesQueryCacheTests extends ESTestCase {
|
|
|
w.close();
|
|
|
ShardId shard = new ShardId("index", "_na_", 0);
|
|
|
r = ElasticsearchDirectoryReader.wrap(r, shard);
|
|
|
- IndexSearcher s = newSearcher(r);
|
|
|
+ IndexSearcher s = newSearcher(r, false);
|
|
|
s.setQueryCachingPolicy(TrivialQueryCachingPolicy.NEVER);
|
|
|
|
|
|
Settings settings = Settings.builder()
|