Search in sources :

Example 1 with LuceneMinimalIndexAccessor

use of org.neo4j.kernel.api.impl.index.LuceneMinimalIndexAccessor in project neo4j by neo4j.

the class FulltextIndexProvider method getMinimalIndexAccessor.

@Override
public MinimalIndexAccessor getMinimalIndexAccessor(IndexDescriptor descriptor) {
    PartitionedIndexStorage indexStorage = getIndexStorage(descriptor.getId());
    DatabaseIndex<FulltextIndexReader> fulltextIndex = new DroppableIndex<>(new DroppableLuceneIndex<>(indexStorage, new ReadOnlyIndexPartitionFactory(), descriptor));
    log.debug("Creating dropper for fulltext schema index: %s", descriptor);
    return new LuceneMinimalIndexAccessor<>(descriptor, fulltextIndex, isReadOnly());
}
Also used : LuceneMinimalIndexAccessor(org.neo4j.kernel.api.impl.index.LuceneMinimalIndexAccessor) DroppableIndex(org.neo4j.kernel.api.impl.index.DroppableIndex) PartitionedIndexStorage(org.neo4j.kernel.api.impl.index.storage.PartitionedIndexStorage) ReadOnlyIndexPartitionFactory(org.neo4j.kernel.api.impl.index.partition.ReadOnlyIndexPartitionFactory)

Example 2 with LuceneMinimalIndexAccessor

use of org.neo4j.kernel.api.impl.index.LuceneMinimalIndexAccessor in project neo4j by neo4j.

the class LuceneIndexProvider method getMinimalIndexAccessor.

@Override
public MinimalIndexAccessor getMinimalIndexAccessor(IndexDescriptor descriptor) {
    PartitionedIndexStorage indexStorage = indexStorageFactory.indexStorageOf(descriptor.getId());
    DroppableIndex<ValueIndexReader> index = new DroppableIndex<>(new DroppableLuceneIndex<>(indexStorage, new ReadOnlyIndexPartitionFactory(), descriptor));
    return new LuceneMinimalIndexAccessor<>(descriptor, index, true);
}
Also used : LuceneMinimalIndexAccessor(org.neo4j.kernel.api.impl.index.LuceneMinimalIndexAccessor) DroppableIndex(org.neo4j.kernel.api.impl.index.DroppableIndex) PartitionedIndexStorage(org.neo4j.kernel.api.impl.index.storage.PartitionedIndexStorage) ValueIndexReader(org.neo4j.kernel.api.index.ValueIndexReader) ReadOnlyIndexPartitionFactory(org.neo4j.kernel.api.impl.index.partition.ReadOnlyIndexPartitionFactory)

Aggregations

DroppableIndex (org.neo4j.kernel.api.impl.index.DroppableIndex)2 LuceneMinimalIndexAccessor (org.neo4j.kernel.api.impl.index.LuceneMinimalIndexAccessor)2 ReadOnlyIndexPartitionFactory (org.neo4j.kernel.api.impl.index.partition.ReadOnlyIndexPartitionFactory)2 PartitionedIndexStorage (org.neo4j.kernel.api.impl.index.storage.PartitionedIndexStorage)2 ValueIndexReader (org.neo4j.kernel.api.index.ValueIndexReader)1