index - property index

Synopsis

index('index_name').property('propertykey_name').by('meta-propertykey_name').add()

Description

A property index specifies an index that is built using the meta-property of a vertex property key in DSE Graph. A vertex label must be specified. The index name must be unique. The property key specified must have multiple cardinality.

Examples

Create an index byLocation index using the property key country and meta-property key of livedIn. The vertex label is specified as author.

schema().vertexLabel('author').index('byLocation').property('country').by('livedIn').add()

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com