File tree 2 files changed +6
-0
lines changed
full-cluster-restart/src/test/java/org/elasticsearch/upgrades
rolling-upgrade/src/test/java/org/elasticsearch/upgrades
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 19
19
import org .elasticsearch .cluster .metadata .MetadataIndexStateService ;
20
20
import org .elasticsearch .common .Strings ;
21
21
import org .elasticsearch .common .settings .Settings ;
22
+ import org .elasticsearch .common .time .DateUtils ;
22
23
import org .elasticsearch .common .xcontent .support .XContentMapValues ;
23
24
import org .elasticsearch .core .Booleans ;
24
25
import org .elasticsearch .core .CheckedFunction ;
@@ -307,6 +308,8 @@ private int createTimeSeriesModeIndex(int replicas) throws IOException {
307
308
mappingsAndSettings .field ("number_of_replicas" , replicas );
308
309
mappingsAndSettings .field ("mode" , "time_series" );
309
310
mappingsAndSettings .field ("routing_path" , "dim" );
311
+ mappingsAndSettings .field ("time_series.start_time" , 1L );
312
+ mappingsAndSettings .field ("time_series.end_time" , DateUtils .MAX_MILLIS_BEFORE_9999 - 1 );
310
313
mappingsAndSettings .endObject ();
311
314
}
312
315
{
Original file line number Diff line number Diff line change 15
15
import org .elasticsearch .client .Response ;
16
16
import org .elasticsearch .client .ResponseException ;
17
17
import org .elasticsearch .common .Strings ;
18
+ import org .elasticsearch .common .time .DateUtils ;
18
19
import org .elasticsearch .common .xcontent .support .XContentMapValues ;
19
20
import org .elasticsearch .core .Booleans ;
20
21
import org .elasticsearch .index .mapper .DateFieldMapper ;
@@ -322,6 +323,8 @@ private void createTsdbIndex() throws IOException {
322
323
indexSpec .startObject ("settings" ).startObject ("index" );
323
324
indexSpec .field ("mode" , "time_series" );
324
325
indexSpec .array ("routing_path" , new String [] { "dim" });
326
+ indexSpec .field ("time_series.start_time" , 1L );
327
+ indexSpec .field ("time_series.end_time" , DateUtils .MAX_MILLIS_BEFORE_9999 - 1 );
325
328
indexSpec .endObject ().endObject ();
326
329
createIndex .setJsonEntity (Strings .toString (indexSpec .endObject ()));
327
330
client ().performRequest (createIndex );
You can’t perform that action at this time.
0 commit comments