File tree 1 file changed +8
-1
lines changed
server/src/internalClusterTest/java/org/opensearch/indices
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 65
65
import java .util .Collection ;
66
66
import java .util .List ;
67
67
68
+ import static org .opensearch .cluster .metadata .IndexMetadata .SETTING_NUMBER_OF_REPLICAS ;
69
+ import static org .opensearch .cluster .metadata .IndexMetadata .SETTING_NUMBER_OF_SHARDS ;
68
70
import static org .opensearch .indices .IndicesRequestCache .INDICES_REQUEST_CACHE_STALENESS_THRESHOLD_SETTING ;
69
71
import static org .opensearch .search .SearchService .CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING ;
70
72
import static org .opensearch .search .aggregations .AggregationBuilders .dateHistogram ;
@@ -104,7 +106,12 @@ public void testCacheAggs() throws Exception {
104
106
.indices ()
105
107
.prepareCreate ("index" )
106
108
.setMapping ("f" , "type=date" )
107
- .setSettings (Settings .builder ().put (IndicesRequestCache .INDEX_CACHE_REQUEST_ENABLED_SETTING .getKey (), true ))
109
+ .setSettings (
110
+ Settings .builder ()
111
+ .put (IndicesRequestCache .INDEX_CACHE_REQUEST_ENABLED_SETTING .getKey (), true )
112
+ .put (SETTING_NUMBER_OF_SHARDS , 1 )
113
+ .put (SETTING_NUMBER_OF_REPLICAS , 0 )
114
+ )
108
115
.get ()
109
116
);
110
117
indexRandom (
You can’t perform that action at this time.
0 commit comments