Skip to content

Commit 48b0e90

Browse files
committed
added comments
1 parent cff3155 commit 48b0e90

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

neo4j-example/src/main/java/Neo4jContentRetrieverExample.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public static void main(String[] args) {
3636
try (Session session = driver.session()) {
3737
session.run("CREATE (book:Book {title: 'Dune'})<-[:WROTE]-(author:Person {name: 'Frank Herbert'})");
3838
}
39+
// The refreshSchema is needed only if we execute write operation after the `Neo4jGraph` instance,
40+
// in this case `CREATE (book:Book...`
41+
// If CREATE (and in general write operations to the db) are performed externally before Neo4jGraph.builder(),
42+
// the refreshSchema() is not needed
3943
graph.refreshSchema();
4044

4145
Neo4jText2CypherRetriever retriever = Neo4jText2CypherRetriever.builder()

0 commit comments

Comments
 (0)