简体   繁体   English

如何使用Java api列出neo4j数据库中的所有标签?

[英]How do I list all labels in my neo4j database using the java api?

I'd like to list all labels in my neo4j database. 我想列出我的neo4j数据库中的所有标签。

For example, in my site, I have 'songs' which I'd like to tag with labels such as 'jazz', 'classical', 'hiphop', or 'funk'. 例如,在我的网站中,我想用“爵士”,“古典”,“嘻哈”或“放克”之类的标签标记“歌曲”。 I can do this, but then I also want to let users know which tags already exist by returning all the labels (aka tags) in my database. 我可以这样做,但是我还想通过返回数据库中的所有标签(也称为标签),让用户知道哪些标签已经存在。

I could use nodes for tags instead, but I thought tagging would be a good use case for labels. 我可以使用节点代替标签,但是我认为标记将是标签的好用例。 Am I missing something? 我想念什么吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM