use of org.neo4j.kernel.api.impl.index.partition.Neo4jSearcherFactory in project neo4j by neo4j.
the class AllNodesCollector method getAllNodes.
public static List<Long> getAllNodes(Directory directory, Value propertyValue) throws IOException {
try (SearcherManager manager = new SearcherManager(directory, new Neo4jSearcherFactory())) {
IndexSearcher searcher = manager.acquire();
Query query = LuceneDocumentStructure.newSeekQuery(propertyValue);
AllNodesCollector collector = new AllNodesCollector();
searcher.search(query, collector);
return collector.nodeIds;
}
}
use of org.neo4j.kernel.api.impl.index.partition.Neo4jSearcherFactory in project neo4j by neo4j.
the class SimpleUniquenessVerifierTest method initLuceneResources.
@BeforeEach
void initLuceneResources() throws Exception {
dirFactory = new DirectoryFactory.InMemoryDirectoryFactory();
Directory dir = dirFactory.open(testDir.directory("test"));
writer = new IndexWriter(dir, IndexWriterConfigs.standard(Config.defaults()));
searcherManager = new SearcherManager(writer, new Neo4jSearcherFactory());
}
Aggregations