mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix AR-499: Indexing of content pushed to the background for slow (>50ms) transformations.
- Made delay configurable git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3062 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -210,6 +210,9 @@
|
||||
<property name="queryRegister">
|
||||
<ref bean="queryRegisterComponent" />
|
||||
</property>
|
||||
<property name="maxAtomicTransformationTime">
|
||||
<value>${lucene.maxAtomicTransformationTime}</value> <!-- milliseconds allowed for inline text transformation -->
|
||||
</property>
|
||||
<property name="queryMaxClauses">
|
||||
<value>${lucene.query.maxClauses}</value>
|
||||
</property>
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user