use of org.neo4j.kernel.impl.index.schema.TokenIndexAccessor in project neo4j by neo4j.
the class BatchInsertTokenIndexesTest method tokenIndexAccessor.
private TokenIndexAccessor tokenIndexAccessor(EntityType entityType) {
var context = DatabaseIndexContext.builder(pageCache, fs, databaseLayout.getDatabaseName()).build();
var id = forSchema(forAnyEntityTokens(entityType), TokenIndexProvider.DESCRIPTOR).withName("index").materialise(0);
Path path = entityType == EntityType.NODE ? databaseLayout.labelScanStore() : databaseLayout.relationshipTypeScanStore();
return new TokenIndexAccessor(context, databaseLayout, new IndexFiles.SingleFile(fs, path), configuration(), id, RecoveryCleanupWorkCollector.immediate());
}
Aggregations