use of org.neo4j.kernel.api.impl.schema.LuceneSchemaIndexProvider in project neo4j by neo4j.
the class StoreMigratorFrom20IT method setUp.
@Before
public void setUp() {
fs = fileSystemRule.get();
pageCache = pageCacheRule.getPageCache(fs);
File storeDirectory = storeDir.directory();
schemaIndexProvider = new LuceneSchemaIndexProvider(fs, DirectoryFactory.PERSISTENT, storeDirectory, NullLogProvider.getInstance(), Config.empty(), OperationalMode.single);
labelScanStoreProvider = NeoStoreDataSourceRule.nativeLabelScanStoreProvider(storeDirectory, fs, pageCache);
upgradableDatabase = new UpgradableDatabase(fs, new StoreVersionCheck(pageCache), new LegacyStoreVersionCheck(fs), recordFormat);
}
use of org.neo4j.kernel.api.impl.schema.LuceneSchemaIndexProvider in project neo4j by neo4j.
the class NonUniqueIndexTests method nodeIdsInIndex.
private List<Long> nodeIdsInIndex(int indexId, String value) throws Exception {
Config config = Config.empty();
SchemaIndexProvider indexProvider = new LuceneSchemaIndexProvider(fileSystemRule.get(), DirectoryFactory.PERSISTENT, directory.graphDbDir(), NullLogProvider.getInstance(), Config.empty(), OperationalMode.single);
IndexSamplingConfig samplingConfig = new IndexSamplingConfig(config);
try (IndexAccessor accessor = indexProvider.getOnlineAccessor(indexId, NewIndexDescriptorFactory.forLabel(0, 0), samplingConfig);
IndexReader reader = accessor.newReader()) {
return PrimitiveLongCollections.asList(reader.query(IndexQuery.exact(1, value)));
}
}
Aggregations