Fix #8933: Only add the base statistic core if it hasn't already been added

This commit is contained in:
max.nuding
2023-07-06 09:17:59 +02:00
committed by Tim Donohue
parent df04b6ecf6
commit a3f2bd0bb7

View File

@@ -1691,6 +1691,14 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
statisticYearCores statisticYearCores
.add(baseSolrUrl.replace("http://", "").replace("https://", "") + statCoreName); .add(baseSolrUrl.replace("http://", "").replace("https://", "") + statCoreName);
} }
var baseCore = ((HttpSolrClient) solr)
.getBaseURL()
.replace("http://", "")
.replace("https://", "");
if (!statisticYearCores.contains(baseCore)) {
//Also add the core containing the current year, if it hasn't been added already
statisticYearCores.add(baseCore);
}
//Also add the core containing the current year ! //Also add the core containing the current year !
statisticYearCores.add(((HttpSolrClient) solr) statisticYearCores.add(((HttpSolrClient) solr)
.getBaseURL() .getBaseURL()