Commits

Micha Kops committed 68ee333

unnecessary relations from the indexed search example removed.

  • Participants
  • Parent commits f84a52f

Comments (0)

Files changed (2)

File src/main/java/com/hascode/tutorial/IndexSearchExample.java

 
 import org.neo4j.graphdb.GraphDatabaseService;
 import org.neo4j.graphdb.Node;
-import org.neo4j.graphdb.Relationship;
 import org.neo4j.graphdb.Transaction;
 import org.neo4j.graphdb.index.Index;
 import org.neo4j.kernel.EmbeddedGraphDatabase;
 			nodeIndex.add(userNode2, "id", 2);
 			nodeIndex.add(userNode2, "name", "Ray");
 
-			Relationship relation = userNode1.createRelationshipTo(userNode2,
-					RelTypes.KNOWS);
-			relation.setProperty("message", "knows");
 			tx.success();
-			System.out.println(String.format("%s %s %s",
-					userNode1.getProperty("name"),
-					relation.getProperty("message"),
-					userNode2.getProperty("name")));
 
 			System.out.println("searching for user with id=2..");
 			Node user = nodeIndex.get("id", 2).getSingle();

File src/main/java/com/hascode/tutorial/RelTypes.java

 import org.neo4j.graphdb.RelationshipType;
 
 public enum RelTypes implements RelationshipType {
-	KNOWS, LEADS_TO, LINKS
+	KNOWS, LEADS_TO
 }