@Retention(value=RUNTIME) @Target(value=TYPE) @Repeatable(value=CompositeIndexes.class) @Inherited public @interface CompositeIndex
By default a composite index is created, setting unique()
to true will create a node key constraint.
Supported only on enterprise edition of Neo4j.
In case you want to use a composite index together with a MapCompositeConverter
, than the following requirements apply:
MapCompositeConverter
must always use the same keys (properties).@CompositeIndex(properties = { "nameOfTheConvertedField.part1", "nameOfTheConvertedField.part2" })where nameOfTheConvertedField is the name of the original field that is converted into a map.
Modifier and Type | Optional Element and Description |
---|---|
String[] |
properties
Names of the properties on which a composite index should be created.
|
boolean |
unique
Indicates whether to apply a node key constraints on the properties.
|
String[] |
value
Alias for
properties() |
public abstract String[] value
properties()
public abstract String[] properties
All property names must match an existing property in the class or one of its super classes. If a property name is overridden by @Property annotation this name must be used.
Order of the properties matters, check Neo4j documentation for composite indexes for details.
Copyright © 2015–2021 Neo Technology, Inc.. All rights reserved.