简体   繁体   English

AWS 海王星 Gremlin 综合指数

[英]AWS Neptune Gremlin Composite Index

I'm using gremlin-java.我正在使用gremlin-java。 And I want to create a unique index and a composite-index.我想创建一个唯一索引和一个复合索引。 But Graph object doesn't provide createIndex function.但是图 object 不提供createIndex function。 I will work on aws-neptune.我将在 aws-neptune 上工作。

Is there a way to create composite-index and unique-index on aws-neptune?有没有办法在 aws-neptune 上创建复合索引和唯一索引?

My expected indexes are:我的预期指标是:

CREATE INDEX ON :`VertexLabel1`(`country`,`value`)
CREATE UNIQUE INDEX ON :`VertexLabel2`(`x_id`)

Graph configuration:图配置:

@Bean
public Cluster gremlinCluster()
{
    return Cluster.build()
            .addContactPoint(GREMLIN_ENDPOINT)
            .port(GREMLIN_PORT)
            .enableSsl(GREMLIN_SSL_ENABLED)
            .create();
} 
...
@Bean
public GraphTraversalSource gremlinGraph(Cluster gremlinCluster)
{
    return traversal().withRemote(DriverRemoteConnection.using(gremlinCluster, "g"));
}

Every property and label that you add to Neptune is automatically indexed three different ways.您添加到 Neptune 的每个属性和 label 都会以三种不同的方式自动编入索引。 There is no need to explicitly create an index.无需显式创建索引。 In fact Neptune does not have an index creation API.实际上 Neptune 没有索引创建 API。 However, you can optionally enable integration with Elastic Search if you need to do full text search type indexing.但是,如果您需要进行全文搜索类型索引,则可以选择启用与 Elastic Search 的集成。 The documentation describing the Neptune indices is here:描述海王星指数的文档在这里:

https://docs.aws.amazon.com/neptune/latest/userguide/feature-overview-data-model.html https://docs.aws.amazon.com/neptune/latest/userguide/feature-overview-data-model.html

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

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