diff --git a/config/alfresco/core-services-context.xml b/config/alfresco/core-services-context.xml
index 51a945dc6b..fc2743c1ba 100644
--- a/config/alfresco/core-services-context.xml
+++ b/config/alfresco/core-services-context.xml
@@ -210,6 +210,9 @@
+
+ ${lucene.maxAtomicTransformationTime}
+
${lucene.query.maxClauses}
diff --git a/config/alfresco/repository.properties b/config/alfresco/repository.properties
index 781dda5e99..ff250ed65c 100644
--- a/config/alfresco/repository.properties
+++ b/config/alfresco/repository.properties
@@ -17,6 +17,11 @@ dir.indexes.lock=${dir.indexes}/locks
# Lucene configuration #
# #################### #
#
+# Millisecond threshold for text transformations
+# Slower transformers will force the text extraction to be asynchronous
+#
+lucene.maxAtomicTransformationTime=20
+#
# The maximum number of clauses that are allowed in a lucene query
#
lucene.query.maxClauses=10000
diff --git a/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerAndSearcherFactory.java b/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerAndSearcherFactory.java
index 00b3026795..a341edf844 100644
--- a/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerAndSearcherFactory.java
+++ b/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerAndSearcherFactory.java
@@ -135,6 +135,9 @@ public class LuceneIndexerAndSearcherFactory implements LuceneIndexerAndSearcher
private QueryRegisterComponent queryRegister;
+ /** the maximum transformation time to allow atomically, defaulting to 20ms */
+ private long maxAtomicTransformationTime = 20;
+
private int indexerMaxFieldLength;
/**
@@ -187,6 +190,18 @@ public class LuceneIndexerAndSearcherFactory implements LuceneIndexerAndSearcher
this.queryRegister = queryRegister;
}
+ /**
+ * Set the maximum average transformation time allowed to a transformer in order to have
+ * the transformation performed in the current transaction. The default is 20ms.
+ *
+ * @param maxAtomicTransformationTime the maximum average time that a text transformation may
+ * take in order to be performed atomically.
+ */
+ public void setMaxAtomicTransformationTime(long maxAtomicTransformationTime)
+ {
+ this.maxAtomicTransformationTime = maxAtomicTransformationTime;
+ }
+
/**
* Check if we are in a global transactoin according to the transaction
* manager
@@ -345,6 +360,7 @@ public class LuceneIndexerAndSearcherFactory implements LuceneIndexerAndSearcher
indexer.setLuceneIndexLock(luceneIndexLock);
indexer.setLuceneFullTextSearchIndexer(luceneFullTextSearchIndexer);
indexer.setContentService(contentService);
+ indexer.setMaxAtomicTransformationTime(maxAtomicTransformationTime);
return indexer;
}
diff --git a/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerImpl.java b/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerImpl.java
index 106b72c884..fc1c41ec58 100644
--- a/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerImpl.java
+++ b/source/java/org/alfresco/repo/search/impl/lucene/LuceneIndexerImpl.java
@@ -199,13 +199,6 @@ public class LuceneIndexerImpl extends LuceneBase implements LuceneIndexer
this.contentService = contentService;
}
- /**
- * Set the maximum average transformation time allowed to a transformer in order to have
- * the transformation performed in the current transaction. The default is 20ms.
- *
- * @param maxAtomicTransformationTime the maximum average time that a text transformation may
- * take in order to be performed atomically.
- */
public void setMaxAtomicTransformationTime(long maxAtomicTransformationTime)
{
this.maxAtomicTransformationTime = maxAtomicTransformationTime;