Class AbstractLuceneIndexerAndSearcherFactory

  • All Implemented Interfaces:
    javax.transaction.xa.XAResource, LuceneConfig, LuceneIndexerAndSearcher, IndexerAndSearcher, org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware

    public abstract class AbstractLuceneIndexerAndSearcherFactory
    extends AbstractIndexerAndSearcher
    implements LuceneIndexerAndSearcher, javax.transaction.xa.XAResource, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.DisposableBean
    This class is resource manager LuceneIndexers and LuceneSearchers. It supports two phase commit inside XA transactions and outside transactions it provides thread local transaction support. TODO: Provide pluggable support for a transaction manager TODO: Integrate with Spring transactions
    Author:
    andyh
    • Field Detail

      • tenantService

        protected org.alfresco.repo.tenant.TenantService tenantService
    • Constructor Detail

      • AbstractLuceneIndexerAndSearcherFactory

        public AbstractLuceneIndexerAndSearcherFactory()
        Private constructor for the singleton TODO: FIt in with IOC
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • getApplicationContext

        public org.springframework.context.ConfigurableApplicationContext getApplicationContext()
        Description copied from interface: LuceneConfig
        Gets the application context through which events can be broadcast
        Specified by:
        getApplicationContext in interface LuceneConfig
        Returns:
        ConfigurableApplicationContext
      • setIndexRootLocation

        public void setIndexRootLocation​(java.lang.String indexRootLocation)
        Set the directory that contains the indexes
        Parameters:
        indexRootLocation - String
      • setTenantService

        public void setTenantService​(org.alfresco.repo.tenant.TenantService tenantService)
        Set the tenant service
        Parameters:
        tenantService - TenantService
      • setQueryRegister

        public void setQueryRegister​(QueryRegisterComponent queryRegister)
        Set the query register
        Parameters:
        queryRegister - QueryRegisterComponent
      • getQueryRegister

        public QueryRegisterComponent getQueryRegister()
        Get the query register.
        Returns:
        - the query register.
      • setMaxAtomicTransformationTime

        public void setMaxAtomicTransformationTime​(long maxAtomicTransformationTime)
        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.
        Specified by:
        setMaxAtomicTransformationTime in interface LuceneConfig
        Parameters:
        maxAtomicTransformationTime - the maximum average time that a text transformation may take in order to be performed atomically.
      • getMaxTransformationTime

        public long getMaxTransformationTime()
        Get the max time for an atomic transform
        Specified by:
        getMaxTransformationTime in interface LuceneConfig
        Returns:
        - milliseconds as a long
      • setBulkLoader

        public void setBulkLoader​(NodeBulkLoader bulkLoader)
      • getIndexer

        public LuceneIndexer getIndexer​(org.alfresco.service.cmr.repository.StoreRef storeRef)
                                 throws IndexerException
        Get an indexer for the store to use in the current transaction for this thread of control.
        Specified by:
        getIndexer in interface IndexerAndSearcher
        Parameters:
        storeRef - - the id of the store
        Returns:
        Indexer
        Throws:
        IndexerException
      • createIndexer

        protected abstract LuceneIndexer createIndexer​(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                                       java.lang.String deltaId)
        Encapsulate creating an indexer
        Parameters:
        storeRef - StoreRef
        deltaId - String
        Returns:
        - the indexer made by the concrete implemntation
      • getSearcher

        public LuceneSearcher getSearcher​(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                          boolean searchDelta)
                                   throws SearcherException
        Encapsulate creating a searcher over the main index
        Specified by:
        getSearcher in interface IndexerAndSearcher
        Parameters:
        storeRef - StoreRef
        searchDelta - - serach the in progress transaction as well as the main index (this is ignored for searches that do full text)
        Returns:
        SearchService
        Throws:
        SearcherException
      • getNodeSearcher

        protected abstract org.alfresco.service.cmr.search.SearchService getNodeSearcher()
                                                                                  throws SearcherException
        Get node-based searcher (for "selectNodes / selectProperties")
        Throws:
        SearcherException
      • getSearcher

        protected abstract LuceneSearcher getSearcher​(org.alfresco.service.cmr.repository.StoreRef storeRef,
                                                      LuceneIndexer indexer)
                                               throws SearcherException
        Get a searcher over the index and the current delta
        Parameters:
        storeRef - StoreRef
        indexer - LuceneIndexer
        Returns:
        - the searcher made by the concrete implementation.
        Throws:
        SearcherException
      • commit

        public void commit​(javax.transaction.xa.Xid xid,
                           boolean onePhase)
                    throws javax.transaction.xa.XAException
        Specified by:
        commit in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • end

        public void end​(javax.transaction.xa.Xid xid,
                        int flag)
                 throws javax.transaction.xa.XAException
        Specified by:
        end in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • forget

        public void forget​(javax.transaction.xa.Xid xid)
                    throws javax.transaction.xa.XAException
        Specified by:
        forget in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • getTransactionTimeout

        public int getTransactionTimeout()
                                  throws javax.transaction.xa.XAException
        Specified by:
        getTransactionTimeout in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • isSameRM

        public boolean isSameRM​(javax.transaction.xa.XAResource xar)
                         throws javax.transaction.xa.XAException
        Specified by:
        isSameRM in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • prepare

        public int prepare​(javax.transaction.xa.Xid xid)
                    throws javax.transaction.xa.XAException
        Specified by:
        prepare in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • recover

        public javax.transaction.xa.Xid[] recover​(int arg0)
                                           throws javax.transaction.xa.XAException
        Specified by:
        recover in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • rollback

        public void rollback​(javax.transaction.xa.Xid xid)
                      throws javax.transaction.xa.XAException
        Specified by:
        rollback in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • setTransactionTimeout

        public boolean setTransactionTimeout​(int timeout)
                                      throws javax.transaction.xa.XAException
        Specified by:
        setTransactionTimeout in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • start

        public void start​(javax.transaction.xa.Xid xid,
                          int flag)
                   throws javax.transaction.xa.XAException
        Specified by:
        start in interface javax.transaction.xa.XAResource
        Throws:
        javax.transaction.xa.XAException
      • flush

        public void flush()
        Description copied from interface: IndexerAndSearcher
        Do any indexing that may be pending on behalf of the current transaction.
        Specified by:
        flush in interface IndexerAndSearcher
      • getIndexRootLocation

        public java.lang.String getIndexRootLocation()
        Description copied from interface: LuceneConfig
        The path to the index location
        Specified by:
        getIndexRootLocation in interface LuceneConfig
        Returns:
        String
      • getIndexerBatchSize

        public int getIndexerBatchSize()
        Description copied from interface: LuceneConfig
        The batch size in which to group flushes of the index.
        Specified by:
        getIndexerBatchSize in interface LuceneConfig
        Returns:
        int
      • setIndexerBatchSize

        public void setIndexerBatchSize​(int indexerBatchSize)
        Set the batch six to use for background indexing
        Specified by:
        setIndexerBatchSize in interface LuceneConfig
        Parameters:
        indexerBatchSize - int
      • getLockDirectory

        public java.lang.String getLockDirectory()
        Get the directory where any lock files are written (by default there are none)
        Returns:
        - the path to the directory
      • setLockDirectory

        public void setLockDirectory​(java.lang.String lockDirectory)
        Description copied from interface: LuceneConfig
        Set the lock dir - just to make sure - this should no longer be used.
        Specified by:
        setLockDirectory in interface LuceneConfig
        Parameters:
        lockDirectory - String
      • getQueryMaxClauses

        public int getQueryMaxClauses()
        Description copied from interface: LuceneConfig
        The maximum numbr of sub-queries the can be generated out of wild card expansion etc
        Specified by:
        getQueryMaxClauses in interface LuceneConfig
        Returns:
        int
      • setQueryMaxClauses

        public void setQueryMaxClauses​(int queryMaxClauses)
        Set the max number of queries in a llucen boolean query
        Specified by:
        setQueryMaxClauses in interface LuceneConfig
        Parameters:
        queryMaxClauses - int
      • setWriteLockTimeout

        public void setWriteLockTimeout​(long timeout)
        Set the lucene write lock timeout
        Specified by:
        setWriteLockTimeout in interface LuceneConfig
        Parameters:
        timeout - long
      • setCommitLockTimeout

        public void setCommitLockTimeout​(long timeout)
        Set the lucene commit lock timeout (no longer used with lucene 2.1)
        Specified by:
        setCommitLockTimeout in interface LuceneConfig
        Parameters:
        timeout - long
      • getCommitLockTimeout

        public long getCommitLockTimeout()
        Get the commit lock timout.
        Specified by:
        getCommitLockTimeout in interface LuceneConfig
        Returns:
        - the timeout
      • getWriteLockTimeout

        public long getWriteLockTimeout()
        Get the write lock timeout
        Specified by:
        getWriteLockTimeout in interface LuceneConfig
        Returns:
        - the timeout in ms
      • setLockPollInterval

        public void setLockPollInterval​(long time)
        Set the lock poll interval in ms
        Specified by:
        setLockPollInterval in interface LuceneConfig
        Parameters:
        time - long
      • getIndexerMaxFieldLength

        public int getIndexerMaxFieldLength()
        Get the max number of tokens in the field
        Specified by:
        getIndexerMaxFieldLength in interface LuceneConfig
        Returns:
        - the max tokens considered.
      • setIndexerMaxFieldLength

        public void setIndexerMaxFieldLength​(int indexerMaxFieldLength)
        Set the max field length.
        Specified by:
        setIndexerMaxFieldLength in interface LuceneConfig
        Parameters:
        indexerMaxFieldLength - int
      • getThreadPoolExecutor

        public java.util.concurrent.ThreadPoolExecutor getThreadPoolExecutor()
        Description copied from interface: LuceneConfig
        Get the thread pool for index merging etc
        Specified by:
        getThreadPoolExecutor in interface LuceneConfig
        Returns:
        ThreadPoolExecutor
      • setThreadPoolExecutor

        public void setThreadPoolExecutor​(java.util.concurrent.ThreadPoolExecutor threadPoolExecutor)
      • setUseInMemorySort

        public void setUseInMemorySort​(boolean useInMemorySort)
        Parameters:
        useInMemorySort - the useInMemorySort to set
      • setMaxRawResultSetSizeForInMemorySort

        public void setMaxRawResultSetSizeForInMemorySort​(int maxRawResultSetSizeForInMemorySort)
        Parameters:
        maxRawResultSetSizeForInMemorySort - the maxRawResultSetSizeForInMemorySort to set
      • getDefaultMLIndexAnalysisMode

        public org.alfresco.repo.search.MLAnalysisMode getDefaultMLIndexAnalysisMode()
        Description copied from interface: LuceneConfig
        The default mode for analysing ML text during index.
        Specified by:
        getDefaultMLIndexAnalysisMode in interface LuceneConfig
        Returns:
        MLAnalysisMode
      • setDefaultMLIndexAnalysisMode

        public void setDefaultMLIndexAnalysisMode​(org.alfresco.repo.search.MLAnalysisMode mode)
        Set the ML analysis mode at index time.
        Specified by:
        setDefaultMLIndexAnalysisMode in interface LuceneConfig
        Parameters:
        mode - MLAnalysisMode
      • getDefaultMLSearchAnalysisMode

        public org.alfresco.repo.search.MLAnalysisMode getDefaultMLSearchAnalysisMode()
        Description copied from interface: LuceneConfig
        The default mode for analysis of ML text during search.
        Specified by:
        getDefaultMLSearchAnalysisMode in interface LuceneConfig
        Returns:
        MLAnalysisMode
      • setDefaultMLSearchAnalysisMode

        public void setDefaultMLSearchAnalysisMode​(org.alfresco.repo.search.MLAnalysisMode mode)
        Set the ML analysis mode at search time
        Specified by:
        setDefaultMLSearchAnalysisMode in interface LuceneConfig
        Parameters:
        mode - MLAnalysisMode
      • getMaxDocIdCacheSize

        public int getMaxDocIdCacheSize()
        Description copied from interface: LuceneConfig
        How many document ids to cache (-ve => unbounded)
        Specified by:
        getMaxDocIdCacheSize in interface LuceneConfig
        Returns:
        int
      • setMaxDocIdCacheSize

        public void setMaxDocIdCacheSize​(int maxDocIdCacheSize)
        Specified by:
        setMaxDocIdCacheSize in interface LuceneConfig
        Parameters:
        maxDocIdCacheSize - int
      • getMaxDocsForInMemoryMerge

        public int getMaxDocsForInMemoryMerge()
        Description copied from interface: LuceneConfig
        Max doc number that will merged in memory (and not on disk)
        Specified by:
        getMaxDocsForInMemoryMerge in interface LuceneConfig
        Returns:
        int
      • setMaxDocsForInMemoryMerge

        public void setMaxDocsForInMemoryMerge​(int maxDocsForInMemoryMerge)
        Specified by:
        setMaxDocsForInMemoryMerge in interface LuceneConfig
        Parameters:
        maxDocsForInMemoryMerge - int
      • getMaxDocumentCacheSize

        public int getMaxDocumentCacheSize()
        Description copied from interface: LuceneConfig
        How many documents to cache (-ve => unbounded)
        Specified by:
        getMaxDocumentCacheSize in interface LuceneConfig
        Returns:
        int
      • setMaxDocumentCacheSize

        public void setMaxDocumentCacheSize​(int maxDocumentCacheSize)
        Specified by:
        setMaxDocumentCacheSize in interface LuceneConfig
        Parameters:
        maxDocumentCacheSize - int
      • getMaxIsCategoryCacheSize

        public int getMaxIsCategoryCacheSize()
        Description copied from interface: LuceneConfig
        How many categories to cache (-ve => unbounded)
        Specified by:
        getMaxIsCategoryCacheSize in interface LuceneConfig
        Returns:
        int
      • setMaxIsCategoryCacheSize

        public void setMaxIsCategoryCacheSize​(int maxIsCategoryCacheSize)
        Specified by:
        setMaxIsCategoryCacheSize in interface LuceneConfig
        Parameters:
        maxIsCategoryCacheSize - int
      • getMaxLinkAspectCacheSize

        public int getMaxLinkAspectCacheSize()
        Description copied from interface: LuceneConfig
        How many link aspects to cache (-ve => unbounded)
        Specified by:
        getMaxLinkAspectCacheSize in interface LuceneConfig
        Returns:
        int
      • setMaxLinkAspectCacheSize

        public void setMaxLinkAspectCacheSize​(int maxLinkAspectCacheSize)
        Specified by:
        setMaxLinkAspectCacheSize in interface LuceneConfig
        Parameters:
        maxLinkAspectCacheSize - int
      • getMaxParentCacheSize

        public int getMaxParentCacheSize()
        Description copied from interface: LuceneConfig
        How many parents to cache (-ve => unbounded)
        Specified by:
        getMaxParentCacheSize in interface LuceneConfig
        Returns:
        int
      • setMaxParentCacheSize

        public void setMaxParentCacheSize​(int maxParentCacheSize)
        Specified by:
        setMaxParentCacheSize in interface LuceneConfig
        Parameters:
        maxParentCacheSize - int
      • getMaxPathCacheSize

        public int getMaxPathCacheSize()
        Description copied from interface: LuceneConfig
        How many paths to cache (-ve => unbounded)
        Specified by:
        getMaxPathCacheSize in interface LuceneConfig
        Returns:
        int
      • setMaxPathCacheSize

        public void setMaxPathCacheSize​(int maxPathCacheSize)
        Specified by:
        setMaxPathCacheSize in interface LuceneConfig
        Parameters:
        maxPathCacheSize - int
      • getMaxTypeCacheSize

        public int getMaxTypeCacheSize()
        Description copied from interface: LuceneConfig
        How many types to cache (-ve => unbounded)
        Specified by:
        getMaxTypeCacheSize in interface LuceneConfig
        Returns:
        int
      • setMaxTypeCacheSize

        public void setMaxTypeCacheSize​(int maxTypeCacheSize)
        Specified by:
        setMaxTypeCacheSize in interface LuceneConfig
        Parameters:
        maxTypeCacheSize - int
      • setMergerMaxMergeDocs

        public void setMergerMaxMergeDocs​(int mergerMaxMergeDocs)
        Specified by:
        setMergerMaxMergeDocs in interface LuceneConfig
        Parameters:
        mergerMaxMergeDocs - int
      • setMergerMergeFactor

        public void setMergerMergeFactor​(int mergerMergeFactor)
        Specified by:
        setMergerMergeFactor in interface LuceneConfig
        Parameters:
        mergerMergeFactor - int
      • setMergerMaxBufferedDocs

        public void setMergerMaxBufferedDocs​(int mergerMaxBufferedDocs)
        Specified by:
        setMergerMaxBufferedDocs in interface LuceneConfig
        Parameters:
        mergerMaxBufferedDocs - int
      • getMergerTargetIndexCount

        public int getMergerTargetIndexCount()
        Description copied from interface: LuceneConfig
        Target index count. Over this indexes will be merged together.
        Specified by:
        getMergerTargetIndexCount in interface LuceneConfig
        Returns:
        int
      • setMergerTargetIndexCount

        public void setMergerTargetIndexCount​(int mergerTargetIndexCount)
        Specified by:
        setMergerTargetIndexCount in interface LuceneConfig
        Parameters:
        mergerTargetIndexCount - int
      • getMergerTargetOverlayCount

        public int getMergerTargetOverlayCount()
        Description copied from interface: LuceneConfig
        Target overlays (will apply deletions and create indexes if over this limit)
        Specified by:
        getMergerTargetOverlayCount in interface LuceneConfig
        Returns:
        int
      • setMergerTargetOverlayCount

        public void setMergerTargetOverlayCount​(int mergerTargetOverlayCount)
        Specified by:
        setMergerTargetOverlayCount in interface LuceneConfig
        Parameters:
        mergerTargetOverlayCount - int
      • getMergerTargetOverlaysBlockingFactor

        public int getMergerTargetOverlaysBlockingFactor()
        Description copied from interface: LuceneConfig
        The factor by which the target overlay count is multiplied to determine the allowable number of overlays before blocking.
        Specified by:
        getMergerTargetOverlaysBlockingFactor in interface LuceneConfig
        Returns:
        the factor by which the target overlay count is multiplied to determine the allowable number of overlays before blocking
      • setMergerTargetOverlaysBlockingFactor

        public void setMergerTargetOverlaysBlockingFactor​(int mergerTargetOverlaysBlockingFactor)
        Specified by:
        setMergerTargetOverlaysBlockingFactor in interface LuceneConfig
        Parameters:
        mergerTargetOverlaysBlockingFactor - int
      • getFairLocking

        public boolean getFairLocking()
        Description copied from interface: LuceneConfig
        Should we use a 'fair' locking policy, giving queue-like access behaviour to the indexes and avoiding starvation? Default is false since fair locking appears to cause deadlock on old JVMs.
        Specified by:
        getFairLocking in interface LuceneConfig
        Returns:
        true if a fair locking policy should be used
      • setFairLocking

        public void setFairLocking​(boolean fairLocking)
        Specified by:
        setFairLocking in interface LuceneConfig
        Parameters:
        fairLocking - boolean
      • setTermIndexInterval

        public void setTermIndexInterval​(int termIndexInterval)
        Specified by:
        setTermIndexInterval in interface LuceneConfig
        Parameters:
        termIndexInterval - int
      • getUseNioMemoryMapping

        public boolean getUseNioMemoryMapping()
        Description copied from interface: LuceneConfig
        Use the nio memory mapping (work arounf for bugs with some JVMs)
        Specified by:
        getUseNioMemoryMapping in interface LuceneConfig
        Returns:
        boolean
      • setUseNioMemoryMapping

        public void setUseNioMemoryMapping​(boolean useNioMemoryMapping)
        Specified by:
        setUseNioMemoryMapping in interface LuceneConfig
        Parameters:
        useNioMemoryMapping - boolean
      • setWriterMaxMergeDocs

        public void setWriterMaxMergeDocs​(int writerMaxMergeDocs)
        Specified by:
        setWriterMaxMergeDocs in interface LuceneConfig
        Parameters:
        writerMaxMergeDocs - int
      • setWriterMergeFactor

        public void setWriterMergeFactor​(int writerMergeFactor)
        Specified by:
        setWriterMergeFactor in interface LuceneConfig
        Parameters:
        writerMergeFactor - int
      • setWriterMaxBufferedDocs

        public void setWriterMaxBufferedDocs​(int writerMaxBufferedDocs)
        Specified by:
        setWriterMaxBufferedDocs in interface LuceneConfig
        Parameters:
        writerMaxBufferedDocs - int
      • isCacheEnabled

        public boolean isCacheEnabled()
        Description copied from interface: LuceneConfig
        Is caching enabled for each index fragment?
        Specified by:
        isCacheEnabled in interface LuceneConfig
        Returns:
        boolean
      • setCacheEnabled

        public void setCacheEnabled​(boolean cacheEnabled)
        Specified by:
        setCacheEnabled in interface LuceneConfig
        Parameters:
        cacheEnabled - boolean
      • getPostSortDateTime

        public boolean getPostSortDateTime()
        Description copied from interface: LuceneConfig
        If we are using the DateAnalyser then lucene sort is only to the date, as that is all that is in the index. If this is true, a query that defines a sort on a datetime field will do a post sort in Java. For the DateTimeAnalyser no post sort is done. (The default config does do a post sort) In the future, this behaviour may also be set per query on the SearchParameters object.
        Specified by:
        getPostSortDateTime in interface LuceneConfig
        Returns:
        boolean
      • setPostSortDateTime

        public void setPostSortDateTime​(boolean postSortDateTime)
        Specified by:
        setPostSortDateTime in interface LuceneConfig
        Parameters:
        postSortDateTime - boolean
      • getMaxDocsForInMemoryIndex

        public int getMaxDocsForInMemoryIndex()
        Description copied from interface: LuceneConfig
        Max docs to allow for in memory indexes (does no apply to merges)
        Specified by:
        getMaxDocsForInMemoryIndex in interface LuceneConfig
        Returns:
        the maxDocsForInMemoryIndex
      • setMaxDocsForInMemoryIndex

        public void setMaxDocsForInMemoryIndex​(int maxDocsForInMemoryIndex)
        Specified by:
        setMaxDocsForInMemoryIndex in interface LuceneConfig
        Parameters:
        maxDocsForInMemoryIndex - the maxDocsForInMemoryIndex to set
      • getMaxRamInMbForInMemoryMerge

        public double getMaxRamInMbForInMemoryMerge()
        Description copied from interface: LuceneConfig
        Ram based limit for in memory merges
        Specified by:
        getMaxRamInMbForInMemoryMerge in interface LuceneConfig
        Returns:
        the maxRamInMbForInMemoryMerge
      • setMaxRamInMbForInMemoryMerge

        public void setMaxRamInMbForInMemoryMerge​(double maxRamInMbForInMemoryMerge)
        Specified by:
        setMaxRamInMbForInMemoryMerge in interface LuceneConfig
        Parameters:
        maxRamInMbForInMemoryMerge - the maxRamInMbForInMemoryMerge to set
      • getMaxRamInMbForInMemoryIndex

        public double getMaxRamInMbForInMemoryIndex()
        Description copied from interface: LuceneConfig
        Max Ram to allow for in memory indexes (does not apply to merges)
        Specified by:
        getMaxRamInMbForInMemoryIndex in interface LuceneConfig
        Returns:
        the maxRamInMbForInMemoryIndex
      • setMaxRamInMbForInMemoryIndex

        public void setMaxRamInMbForInMemoryIndex​(double maxRamInMbForInMemoryIndex)
        Specified by:
        setMaxRamInMbForInMemoryIndex in interface LuceneConfig
        Parameters:
        maxRamInMbForInMemoryIndex - the maxRamInMbForInMemoryIndex to set
      • getMergerRamBufferSizeMb

        public double getMergerRamBufferSizeMb()
        Description copied from interface: LuceneConfig
        Ram based limit for in memory portion of merger index.
        Specified by:
        getMergerRamBufferSizeMb in interface LuceneConfig
        Returns:
        the mergerRamBufferSizeMb
      • setMergerRamBufferSizeMb

        public void setMergerRamBufferSizeMb​(double mergerRamBufferSizeMb)
        Specified by:
        setMergerRamBufferSizeMb in interface LuceneConfig
        Parameters:
        mergerRamBufferSizeMb - the mergerRamBufferSizeMb to set
      • getWriterRamBufferSizeMb

        public double getWriterRamBufferSizeMb()
        Description copied from interface: LuceneConfig
        Ram based limit for in memory portion of writer index.
        Specified by:
        getWriterRamBufferSizeMb in interface LuceneConfig
        Returns:
        the writerRamBufferSizeMb
      • setWriterRamBufferSizeMb

        public void setWriterRamBufferSizeMb​(double writerRamBufferSizeMb)
        Specified by:
        setWriterRamBufferSizeMb in interface LuceneConfig
        Parameters:
        writerRamBufferSizeMb - the writerRamBufferSizeMb to set
      • setContentIndexingEnabled

        public void setContentIndexingEnabled​(boolean contentIndexingEnabled)
        Description copied from interface: LuceneConfig
        Enable/Disable the indexing of content Content is not indexed and FTS disabled When disabled, documents are marked as requiring FTS indexing. When enabled the normal FTS process will catch up with content that was not indexed.
        Specified by:
        setContentIndexingEnabled in interface LuceneConfig
        Parameters:
        contentIndexingEnabled - boolean
      • getAllStores

        protected abstract java.util.List<org.alfresco.service.cmr.repository.StoreRef> getAllStores()
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • deleteDirectory

        public static void deleteDirectory​(java.io.File directory)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • destroy

        public void destroy()
                     throws java.lang.Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        java.lang.Exception