문제

Does anybody know how to get all the indexes attached to a given label (or all the labels) in Neo4J 2.0 listed?

I've only found this:

http://api.neo4j.org/2.0.0-M03/org/neo4j/graphdb/schema/Schema.html#getIndexes(org.neo4j.graphdb.Label)

But how do I do that through Cypher? Or at least REST API?

Thanks!

도움이 되었습니까?

해결책

There is a :schema command in the browser and schema command in Neo4j shell.

In the Java Core API it is in db.schema().getIndexes(label)

다른 팁

Found an answer to my own question inside the main.js file of this great Neo4J Node.Js module: http://github.com/philippkueng/node-neo4j

There is in fact a REST API endpoint, which provides all the indexes in the database:

http://localhost:7474/db/data/schema/index/

Indexes on a specific label:

http://localhost:7474/db/data/schema/index/User

I only wonder if Neo4J is moving away from REST API towards Cypher - will they offer this functionality in there as well?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top