[orientdb] How do i add gremlin output as vertex property?

2016-11-10 Thread Peter Wang
I am new to gremlin. Can anyone explain the way to add gremlin map to 
vertex property? i ran the example and tried to add m to g.v as property of 
it.

Thanks a lot

g = new OrientGraph('memory:test')
// calculate basic collaborative filtering for vertex 1
m = [:]
g.v(1).out('likes').in('likes').out('likes').groupCount(m)
m.sort{a,b -> a.value <=> b.value}

-- 

--- 
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-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [orientdb] Re: [Announcement] OrientDB and TinkerPop 3

2016-11-10 Thread Luca Garulli
On 10 November 2016 at 01:00, odbuser  wrote:

> Yes this is amazing news.  I'm curious about the following:
>
> What is the performance like?
>

What do you mean? In comparison to TP2?


> What part of Tinkerpop 3 is supported?
>

Now only a limited set of features are supported, we're working to extent
them to support most of them soon.


> What is the impact and transition for users who are currently using
> OrientDB with Tinkerpop 2 apis such as Frames?
>

Don't worry, existent users could continue using the old API through the
OrientDB-TinkerPop-2 external plugin.


Best Regards,

Luca Garulli
Founder & CEO
OrientDB LTD 

Want to share your opinion about OrientDB?
Rate & review us at Gartner's Software Review



>
> ---
> 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-database+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
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-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Recover all embedded records in any class

2016-11-10 Thread alessandrorota04
>From previous versions to 2.2 if you created a database as document you had 
not the classes V and E.
Instead starting from version 2.2 if you create a document database you 
have the classes V and E, and if your classes inherit from class V, you 
have a graph model otherwise you have a document model.

Best regards.

-- 

--- 
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-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Recover all embedded records in any class

2016-11-10 Thread Academia Learning Centro de inglés y de formación

Hi, I just tried and yes, inheriting from class V, you can get all classes 
City, in the documents model just like in the graphs using the query:
Select expand ($ c)
Let $ a = (select expand from v),
$ B = (select from City),
$ C = unionAll ($ a, $ b)


El jueves, 10 de noviembre de 2016, 9:13:39 (UTC+1), Academia Learning 
Centro de inglés y de formación escribió:
>
> OK thanks. One last question, in the document model, can also be inherited 
> from class V?
> If so then it would be easier to find the city class, right? With the 
> query of the previous example:
> Select expand (City) from v
>
> Or in the document model this is not possible?
>
> Thank you!
>
> El miércoles, 9 de noviembre de 2016, 16:56:00 (UTC+1), 
> alessand...@gmail.com escribió:
>>
>> Hi,
>> you could use this javascript function
>>
>> var db=orient.getDatabase();
>> var classes=db.query('select name from (select expand(classes) from 
>> metadata:schema) where name not in 
>> ["_studio","OUser","OSchedule","E","V","OFunction","OIdentity","OTriggered","ORole","ORestricted","OSequence"]'
>> ); 
>>
>> var result=[];
>>
>> for (var i = 0; i < classes.length; i++) { 
>>var className = classes[i].field('name');
>>if(className=="City"){
>>   var cities=db.query("select from " + className);
>>   for (var j = 0; j < cities.length; j++) { 
>>   result.push(cities[j]);
>>   }
>>}
>>else{
>>   var cities=db.query("select expand(City) from " + className);
>>   for (var j = 0; j < cities.length; j++) { 
>>  result.push(cities[j]);
>>   } 
>>}
>> }
>> return result;
>>
>> Hope it helps.
>>
>>

-- 

--- 
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-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[orientdb] Re: Recover all embedded records in any class

2016-11-10 Thread Academia Learning Centro de inglés y de formación
OK thanks. One last question, in the document model, can also be inherited 
from class V?
If so then it would be easier to find the city class, right? With the query 
of the previous example:
Select expand (City) from v

Or in the document model this is not possible?

Thank you!

El miércoles, 9 de noviembre de 2016, 16:56:00 (UTC+1), 
alessand...@gmail.com escribió:
>
> Hi,
> you could use this javascript function
>
> var db=orient.getDatabase();
> var classes=db.query('select name from (select expand(classes) from 
> metadata:schema) where name not in 
> ["_studio","OUser","OSchedule","E","V","OFunction","OIdentity","OTriggered","ORole","ORestricted","OSequence"]'
> ); 
>
> var result=[];
>
> for (var i = 0; i < classes.length; i++) { 
>var className = classes[i].field('name');
>if(className=="City"){
>   var cities=db.query("select from " + className);
>   for (var j = 0; j < cities.length; j++) { 
>   result.push(cities[j]);
>   }
>}
>else{
>   var cities=db.query("select expand(City) from " + className);
>   for (var j = 0; j < cities.length; j++) { 
>  result.push(cities[j]);
>   } 
>}
> }
> return result;
>
> Hope it helps.
>
>

-- 

--- 
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-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.