[orientdb] Re: How to get records that are linked to each of given vertices

2015-03-12 Thread Red-0ne
Yes, tags types and number are chosen by user and cannot be predicted. I understand that this could be inefficient, but shouldn't we have a (native) way (a *CONTAINSEACH* *[ ]* keyword, or something alike) to get vertices connected to each vertex of a given set? Isn't this a relatively frequent

[orientdb] Re: How to get records that are linked to each of given vertices

2015-03-11 Thread Colin
I think this is really a good use case for the built-in JavaScript support if you're wanting to stick with console access instead of using the Java API. (You can also execute JavaScript via the Java API too.) -Colin Orient Technologies The Company behind OrientDB On Tuesday, March 10, 2015

[orientdb] Re: How to get records that are linked to each of given vertices

2015-03-09 Thread Colin
If the name properties are random and not tied to a specific group or type of user, then there's no simple way to achieve what you want since you can't predict the type of name or how many will be queried. This is not an efficient query if Data contains millions of edges. It would be easier to

[orientdb] Re: How to get records that are linked to each of given vertices

2015-03-06 Thread Red-0ne
Ok here is an example: CREATE DATABASE remote:localhost/testdb root root memory CREATE CLASS Data EXTENDS V; CREATE PROPERTY Data.id INTEGER; CREATE CLASS Tag EXTENDS V; CREATE PROPERTY Tag.name STRING; CREATE CLASS hasTag EXTENDS E; CREATE VERTEX Data SET id = 1; CREATE VERTEX Data SET id =

[orientdb] Re: How to get records that are linked to each of given vertices

2015-03-05 Thread Red-0ne
Sorry for being misleading. A, B, C are vertices of themselves and created through CREATE VERTEX command. I just tried to represent them by their @rids in the above query. On Thursday, 5 March 2015 16:51:14 UTC+1, Colin wrote: I think I'm a little puzzled why/how A, B are @rids and vertices

[orientdb] Re: How to get records that are linked to each of given vertices

2015-03-05 Thread Colin
I think I'm a little puzzled why/how A, B are @rids and vertices but not. :-) Are A, B, C always unique 'tags' as in properties of vertices that denote some kind of type? Or, are A, B, C types of vertices themselves? On Thursday, March 5, 2015 at 5:37:37 AM UTC-6, Red-0ne wrote: Actually

[orientdb] Re: How to get records that are linked to each of given vertices

2015-03-05 Thread Colin
If A, B, C are all vertices and each represents a different type of class, then you could could create a different edge type for each one. Are A, B, C all unique types that derive from a common base? Maybe if you can give a more real-world example with the needed result, we can figure it out.

[orientdb] Re: How to get records that are linked to each of given vertices

2015-03-03 Thread Colin
I don't know if this will help, but I usually model my edges so they they reflect a specific type (or sub-type). If you're needing to query a result for one or more specific RIDs, I'd create an index. -Colin Orient Technologies The Company behind OrientDB On Tuesday, March 3, 2015 at