索引

创建索引

创建边索引

CreateIndexRequest request = new CreateIndexRequest();
request.setFulltext(false);
request.setEdgeProperty(edgePropertyName);
client.createIndex(request);

创建点索引

CreateIndexRequest request = new CreateIndexRequest();
request.setFulltext(false);
request.setNodeProperty(nodePropertyName);
client.createIndex(request);

创建全文索引

CreateIndexRequest request = new CreateIndexRequest();
request.setFulltext(true);
request.setEdgeProperty(edgePropertyName);
request.setName(edgeIndexName);
client.createIndex(request);

删除索引

删除边索引

DropIndexRequest request = new DropIndexRequest();
request.setEdgeProperty(edgePropertyName);
client.dropIndex(request);

删除点索引

DropIndexRequest request = new DropIndexRequest();
request.setNodeProperty(nodePropertyName);
client.dropIndex(request);

删除全文索引

DropIndexRequest request = new DropIndexRequest();
request.setName(edgeIndexName);
request.setFulltext(true);
client.dropIndex(request);

列出所有索引信息

ShowIndexRequest request = new ShowIndexRequest();
println(client.showIndex(request));

列出所有全文索引

ShowIndexRequest request = new ShowIndexRequest();
request.setFulltext(true);
println(client.showIndex(request));