我试图在我的本地控制台中重现莎士比亚的数据集和查询。我创建了节点和关系。
neo4j-sh (0)$ START theater=node:venues(theatre = 'Theatre Royal'), newcastle=node:cities(city = 'Newcastle'), bard=node:authors('firstname:William AND lastname:Shakespeare') MATCH (newcastle)<-[:IN*1..4]-(theater)<-[:VENUE]-(performance)-[:PERFORMED]->(play)<-[w:WROTE]-(bard) WHERE w.date > 1608 RETURN play;
==> MissingIndexException: Index `authors` does not exist
没有识别作者、地点和城市索引,所以我去添加和删除索引选项卡并创建了这些索引。这是屏幕转储
neo4j-sh (0)$ index --indexes
==> Node indexes:
==> venues
==> cities
==> authors
==>
==> Relationship indexes:
但是现在,同样的查询没有错误但什么也没有返回。我究竟做错了什么。从 Web 控制台创建索引的语法不是很清楚。我究竟做错了什么?