Search in sources :

Example 1 with SimpleFSLockFactory

use of org.apache.lucene.store.SimpleFSLockFactory in project entando-core by entando.

the class IndexerDAO method init.

/**
 * Inizializzazione dell'indicizzatore.
 *
 * @param dir La cartella locale contenitore dei dati persistenti.
 * @throws ApsSystemException In caso di errore
 */
@Override
public void init(File dir) throws ApsSystemException {
    try {
        this._dir = FSDirectory.open(dir);
        this._dir.setLockFactory(new SimpleFSLockFactory(dir));
    } catch (Throwable t) {
        _logger.error("Error creating directory", t);
        throw new ApsSystemException("Error creating directory", t);
    }
    _logger.debug("Indexer: search engine index ok.");
}
Also used : ApsSystemException(com.agiletec.aps.system.exception.ApsSystemException) SimpleFSLockFactory(org.apache.lucene.store.SimpleFSLockFactory)

Example 2 with SimpleFSLockFactory

use of org.apache.lucene.store.SimpleFSLockFactory in project entando-core by entando.

the class IndexerDAO method init.

/**
 * Inizializzazione dell'indicizzatore.
 * @param dir La cartella locale contenitore dei dati persistenti.
 * @throws ApsSystemException In caso di errore
 */
@Override
public void init(File dir) throws ApsSystemException {
    try {
        this._dir = FSDirectory.open(dir);
        this._dir.setLockFactory(new SimpleFSLockFactory(dir));
    } catch (Throwable t) {
        _logger.error("Error creating directory", t);
        throw new ApsSystemException("Error creating directory", t);
    }
    _logger.debug("Indexer: search engine index ok.");
}
Also used : ApsSystemException(com.agiletec.aps.system.exception.ApsSystemException) SimpleFSLockFactory(org.apache.lucene.store.SimpleFSLockFactory)

Aggregations

ApsSystemException (com.agiletec.aps.system.exception.ApsSystemException)2 SimpleFSLockFactory (org.apache.lucene.store.SimpleFSLockFactory)2