Posted a tad too soon, the nice exception messages cleared things up for me.
Unique constraint works like a regular index.

Thanks
Pieter 

On Wednesday, 25 June 2014 20:59:19 UTC+4:30, Pieter Martin wrote:
>
> Hi,
>
> I am having trouble understanding the relationship between a constraint 
> and a index.
>
> I primarily use the java api to interact with neo4j.
>
> If I wish to have a regular indexed label:property and have a unique 
> constraint on it do one create both a unique constraint and a index?
>
> i.e. 
>
> graph.schema.indexFor(DynamicLabel.label(label)).on(propertyKey).create();
>
> and
>  
>
> graph.schema.constraintFor(DynamicLabel.label(label)).assertPropertyIsUnique(propertyKey).create();
>
> Thanks
> Pieter
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to