質問

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