Regarding UNIQUE indexes on Edges

12 views
Skip to first unread message

Abhishek Jha

unread,
Apr 23, 2014, 7:46:30 AM4/23/14
to orient-...@googlegroups.com

I have the Index Created on connected class with unique property. But still as you can see it excepts edges between same node. Can ypu please tell why this is happening.


Andrey Lomakin

unread,
Apr 23, 2014, 7:48:34 AM4/23/14
to orient-database
HI,
Sorry could you provide more information.
Like: 
Which version do you use ?
Which set of operations should we perform to reproduce your result ?


--

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



--
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

Abhishek Jha

unread,
Apr 23, 2014, 7:57:29 AM4/23/14
to orient-...@googlegroups.com
Hey I am using Blueprint 2.6.0 snapshot and OrientDB 1.7.RC2 version.

The operations i performed are :
1) base.addEdge("connected",connected); // base and connected are two vertices. And when i ran this automatically connected class was created.
2) Although in console i could see 'in' and 'out' properties for connected class, but since during index creation it said no such property i used these 2 commands :
a) create property connected.in STRING 
b) create property connected.out STRING     
3) After this i ran " CREATE INDEX UniqueLink ON link (in,out) UNIQUE " in console
4) Then after from my java code I made 2 vertices , let A and B
5) Then I tried making A->B, B->A, A->B, B->A. After every edge creation i called graph.commit() too.
6) And all those 4 queries succeed, instead of failing because of duplicate edge.
7) At last i used graph.shutdown();

Andrey Lomakin

unread,
Apr 23, 2014, 7:59:55 AM4/23/14
to orient-database
Do you use remote or local database instance ?

Abhishek Jha

unread,
Apr 23, 2014, 8:01:59 AM4/23/14
to orient-...@googlegroups.com
I used Remote instance with localhost in it. I will have to use server, but for testing I am using localhost.
Reply all
Reply to author
Forward
0 new messages