Search in sources :

Example 1 with LuceneTimeline

use of org.neo4j.index.lucene.LuceneTimeline in project neo4j by neo4j.

the class TestTimeline method nodeTimeline.

private TimelineIndex<PropertyContainer> nodeTimeline() {
    try (Transaction tx = db.beginTx()) {
        Index<Node> nodeIndex = db.index().forNodes("timeline");
        tx.success();
        return new LuceneTimeline(db, nodeIndex);
    }
}
Also used : Transaction(org.neo4j.graphdb.Transaction) Node(org.neo4j.graphdb.Node) LuceneTimeline(org.neo4j.index.lucene.LuceneTimeline)

Example 2 with LuceneTimeline

use of org.neo4j.index.lucene.LuceneTimeline in project neo4j by neo4j.

the class TestTimeline method relationshipTimeline.

private TimelineIndex<PropertyContainer> relationshipTimeline() {
    try (Transaction tx = db.beginTx()) {
        RelationshipIndex relationshipIndex = db.index().forRelationships("timeline");
        tx.success();
        return new LuceneTimeline(db, relationshipIndex);
    }
}
Also used : Transaction(org.neo4j.graphdb.Transaction) RelationshipIndex(org.neo4j.graphdb.index.RelationshipIndex) LuceneTimeline(org.neo4j.index.lucene.LuceneTimeline)

Aggregations

Transaction (org.neo4j.graphdb.Transaction)2 LuceneTimeline (org.neo4j.index.lucene.LuceneTimeline)2 Node (org.neo4j.graphdb.Node)1 RelationshipIndex (org.neo4j.graphdb.index.RelationshipIndex)1