Initialize solr shards at first stats post

Make it more likely that the shards are awake on first use
This commit is contained in:
Terry W Brady
2017-01-31 15:02:55 -08:00
parent 4f7520d532
commit f7cadf8774

View File

@@ -181,6 +181,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
{
return;
}
initSolrYearCores();
try
@@ -220,6 +221,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
if (solr == null || locationService == null) {
return;
}
initSolrYearCores();
try {
SolrInputDocument doc1 = getCommonSolrDoc(dspaceObject, ip, userAgent, xforwardedfor,
@@ -445,6 +447,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
{
SolrInputDocument solrDoc = getCommonSolrDoc(resultObject, request, currentUser);
if (solrDoc == null) return;
initSolrYearCores();
for (String query : queries) {
solrDoc.addField("query", query);
@@ -491,6 +494,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
@Override
public void postWorkflow(UsageWorkflowEvent usageWorkflowEvent) throws SQLException {
initSolrYearCores();
try {
SolrInputDocument solrDoc = getCommonSolrDoc(usageWorkflowEvent.getObject(), null, null);