mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-12 12:33:18 +00:00
Initialize solr shards at first stats post
Make it more likely that the shards are awake on first use
This commit is contained in:
@@ -181,6 +181,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
initSolrYearCores();
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -220,6 +221,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
|
|||||||
if (solr == null || locationService == null) {
|
if (solr == null || locationService == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
initSolrYearCores();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SolrInputDocument doc1 = getCommonSolrDoc(dspaceObject, ip, userAgent, xforwardedfor,
|
SolrInputDocument doc1 = getCommonSolrDoc(dspaceObject, ip, userAgent, xforwardedfor,
|
||||||
@@ -445,6 +447,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
|
|||||||
{
|
{
|
||||||
SolrInputDocument solrDoc = getCommonSolrDoc(resultObject, request, currentUser);
|
SolrInputDocument solrDoc = getCommonSolrDoc(resultObject, request, currentUser);
|
||||||
if (solrDoc == null) return;
|
if (solrDoc == null) return;
|
||||||
|
initSolrYearCores();
|
||||||
|
|
||||||
for (String query : queries) {
|
for (String query : queries) {
|
||||||
solrDoc.addField("query", query);
|
solrDoc.addField("query", query);
|
||||||
@@ -491,6 +494,7 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postWorkflow(UsageWorkflowEvent usageWorkflowEvent) throws SQLException {
|
public void postWorkflow(UsageWorkflowEvent usageWorkflowEvent) throws SQLException {
|
||||||
|
initSolrYearCores();
|
||||||
try {
|
try {
|
||||||
SolrInputDocument solrDoc = getCommonSolrDoc(usageWorkflowEvent.getObject(), null, null);
|
SolrInputDocument solrDoc = getCommonSolrDoc(usageWorkflowEvent.getObject(), null, null);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user