Fix monthly index New Year's bug
When formatting the date around new year's day, retrieving WEEK_YEAR can
yield next year or previous year as result. We should simply use YEAR.
More details:
@@ -506,7 +506,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
}
private String getMonthlyIndexName(Date date) {
- String d = new SimpleDateFormat("-YYYY-MM").format(date);
+ String d = new SimpleDateFormat("-yyyy-MM").format(date);
String monthlyIndexName = indexName + d;
return monthlyIndexName;
}
