use of org.apache.geode.cache.lucene.LuceneIndexExistsException in project geode by apache.
the class LuceneIndexCreation method beforeCreate.
@Override
public void beforeCreate(Extensible<Region<?, ?>> source, Cache cache) {
LuceneServiceImpl service = (LuceneServiceImpl) LuceneServiceProvider.get(cache);
Analyzer analyzer = this.fieldAnalyzers == null ? new StandardAnalyzer() : new PerFieldAnalyzerWrapper(new StandardAnalyzer(), this.fieldAnalyzers);
try {
service.createIndex(getName(), getRegionPath(), analyzer, this.fieldAnalyzers, getFieldNames());
} catch (LuceneIndexExistsException e) {
logger.info(LocalizedStrings.LuceneIndexCreation_IGNORING_DUPLICATE_INDEX_CREATION_0_ON_REGION_1.toLocalizedString(e.getIndexName(), e.getRegionPath()));
}
}
Aggregations