@@ -242,16 +242,31 @@ public void testSearchIdleBoolQueryMatchOneIndex() throws InterruptedException {
242242 // are executed only if we have enough shards.
243243 int idleIndexShardsCount = 3 ;
244244 int activeIndexShardsCount = 3 ;
245+
246+ var idleIndexSettingsBuilder = Settings .builder ()
247+ .put (IndexSettings .INDEX_SEARCH_IDLE_AFTER .getKey (), "500ms" )
248+ .put (IndexMetadata .SETTING_NUMBER_OF_SHARDS , idleIndexShardsCount )
249+ .put (IndexSettings .MODE .getKey (), IndexMode .TIME_SERIES )
250+ .put (IndexMetadata .INDEX_ROUTING_PATH .getKey (), "routing_field" )
251+ .put (IndexSettings .TIME_SERIES_START_TIME .getKey (), "2021-05-10T00:00:00.000Z" )
252+ .put (IndexSettings .TIME_SERIES_END_TIME .getKey (), "2021-05-11T00:00:00.000Z" );
253+
254+ var activeIndexSettingsBuilder = Settings .builder ()
255+ .put (IndexSettings .INDEX_SEARCH_IDLE_AFTER .getKey (), "500ms" )
256+ .put (IndexMetadata .SETTING_NUMBER_OF_SHARDS , activeIndexShardsCount )
257+ .put (IndexSettings .MODE .getKey (), IndexMode .TIME_SERIES )
258+ .put (IndexMetadata .INDEX_ROUTING_PATH .getKey (), "routing_field" )
259+ .put (IndexSettings .TIME_SERIES_START_TIME .getKey (), "2021-05-12T00:00:00.000Z" )
260+ .put (IndexSettings .TIME_SERIES_END_TIME .getKey (), "2021-05-13T23:59:59.999Z" );
261+
262+ if (IndexSettings .DOC_VALUES_SKIPPER .isEnabled ()) {
263+ idleIndexSettingsBuilder .put (IndexSettings .USE_DOC_VALUES_SKIPPER .getKey (), false );
264+ activeIndexSettingsBuilder .put (IndexSettings .USE_DOC_VALUES_SKIPPER .getKey (), false );
265+ }
266+
245267 createIndex (
246268 idleIndex ,
247- Settings .builder ()
248- .put (IndexSettings .INDEX_SEARCH_IDLE_AFTER .getKey (), "500ms" )
249- .put (IndexMetadata .SETTING_NUMBER_OF_SHARDS , idleIndexShardsCount )
250- .put (IndexSettings .MODE .getKey (), IndexMode .TIME_SERIES )
251- .put (IndexMetadata .INDEX_ROUTING_PATH .getKey (), "routing_field" )
252- .put (IndexSettings .TIME_SERIES_START_TIME .getKey (), "2021-05-10T00:00:00.000Z" )
253- .put (IndexSettings .TIME_SERIES_END_TIME .getKey (), "2021-05-11T00:00:00.000Z" )
254- .build (),
269+ idleIndexSettingsBuilder .build (),
255270 "doc" ,
256271 "keyword" ,
257272 "type=keyword" ,
@@ -262,14 +277,7 @@ public void testSearchIdleBoolQueryMatchOneIndex() throws InterruptedException {
262277 );
263278 createIndex (
264279 activeIndex ,
265- Settings .builder ()
266- .put (IndexSettings .INDEX_SEARCH_IDLE_AFTER .getKey (), "500ms" )
267- .put (IndexMetadata .SETTING_NUMBER_OF_SHARDS , activeIndexShardsCount )
268- .put (IndexSettings .MODE .getKey (), IndexMode .TIME_SERIES )
269- .put (IndexMetadata .INDEX_ROUTING_PATH .getKey (), "routing_field" )
270- .put (IndexSettings .TIME_SERIES_START_TIME .getKey (), "2021-05-12T00:00:00.000Z" )
271- .put (IndexSettings .TIME_SERIES_END_TIME .getKey (), "2021-05-13T23:59:59.999Z" )
272- .build (),
280+ activeIndexSettingsBuilder .build (),
273281 "doc" ,
274282 "keyword" ,
275283 "type=keyword" ,
0 commit comments