如何在orientdb中创建索引(原生javaapi)

How to create an index in orientdb (native java api)

当图表开始增长时,我收到以下警告:

'bertex = false' fetched more than 50000 records: to speed up the execution, create an index or change the query to use an existent index

有没有办法从 java api 创建索引?

我似乎没有找到合适的 java文档。

非常感谢!

试试这个:

graph.createKeyIndex("name", Vertex.class, new Parameter("type", "UNIQUE"));

有关详细信息,请查看此 link:http://orientdb.com/docs/2.1/Graph-Database-Tinkerpop.html#using-indices

希望对您有所帮助。

此致