From 833c993661c7b41f009d685db086283c05effd36 Mon Sep 17 00:00:00 2001 From: Andrew Hind Date: Thu, 29 Sep 2011 14:28:46 +0000 Subject: [PATCH] Fix for ALF-10561 SOLR stops indexing if it is given a property that is neither indexed or stored - it throws an exception Fix ALF-10358 SOLR No easy way to get the current last TX indexed to monitor how the SOLR index is building git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30857 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repository/solr/transactions.get.json.ftl | 4 ++++ .../org/alfresco/repo/web/scripts/solr/TransactionsGet.java | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/solr/transactions.get.json.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/solr/transactions.get.json.ftl index 8c35b44dfd..5d572867d7 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/solr/transactions.get.json.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/solr/transactions.get.json.ftl @@ -7,4 +7,8 @@ <#if txn_has_next>, ] + <#if maxTxnCommitTime??> + ,"maxTxnCommitTime": ${maxTxnCommitTime?c} + + } \ No newline at end of file diff --git a/source/java/org/alfresco/repo/web/scripts/solr/TransactionsGet.java b/source/java/org/alfresco/repo/web/scripts/solr/TransactionsGet.java index 67c67ee865..e1bf6a306c 100644 --- a/source/java/org/alfresco/repo/web/scripts/solr/TransactionsGet.java +++ b/source/java/org/alfresco/repo/web/scripts/solr/TransactionsGet.java @@ -60,6 +60,12 @@ public class TransactionsGet extends DeclarativeWebScript Map model = new HashMap(1, 1.0f); model.put("transactions", transactions); + + Long maxTxnCommitTime = solrTrackingComponent.getMaxTxnCommitTime(); + if(maxTxnCommitTime != null) + { + model.put("maxTxnCommitTime", maxTxnCommitTime); + } if (logger.isDebugEnabled()) {