title: index error in py2neo , Neo4j
body: <p>I'm brandnew to py2neo so I figured I would start off with a simple program. Its returning a TypeError: Index is not iterable. Anyway I'm trying to add a set of nodes and then create relationships for them while avoiding duplicates. Don't know what I'm doing wrong.</p>
  
  <pre><code>from py2neo import neo4j, cypher
  graph_db = neo4j.GraphDatabaseService("http://localhost:7474/db/data/")
  
  happy = "happy"
  glad = "glad"
  mad = "mad"
  irate = "irate"
  love = "love"
  
  wordindex = graph_db.get_or_create_index(neo4j.Node, "word")
  
  for node in wordindex:
                wordindex.add("word", node["word"], node)
  
  
  def createnodes(a, b, c, d, e):
  nodes = wordindex.get_or_create(
      {"word": (a)},
      {"word": (b)},
      {"word": (c)},
      {"word": (d)},
      {"word": (e)},
      )
  
  def createrel(a, b, c, d, e):
  rels = wordindex.get_or_create(
      ((a), "is", (b)),
      ((c), "is", (d)),
      ((e), "is", (a)),
      )
  
  
  createnodes(happy, glad, mad, irate, love)
  createrel(happy, glad, mad, irate, love)
  </code></pre>