Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Very different results from same query Studio vs Oriento

33 views
Skip to first unread message

Charles Bandes

unread,
Feb 14, 2015, 5:05:01 PM2/14/15
to orient-...@googlegroups.com
I want to select all records returned by shortestPath. So I am using a subquery like so:

SELECT expand(shortestPath) from (SELECT shortestPath(#11:25989,#11:3953,"Both"))

In Studio that returns what I would expect:

{
    "result": [
        {
            "@type": "d",
            "@rid": "#11:346",
            "@version": 1,
            "@class": "Character",
            "char_id": 2149,
            "in_Enemy": [
                "#14:206",
                "#14:487",
                "#14:1199",
                "#14:1777",

(And a whole bunch more)

But the same query in Oriento via

db.query('SELECT expand(shortestPath) from (select shortestPath(#11:346,#11:13138,"Both"))').then(function(path){
    console
.log(path);
   
return res.json(200, path);
 
});

Returns a much smaller and less useful object:

[{"@rid":"#11:346"},{"@rid":"#11:1045"},{"@rid":"#11:4870"},{"@rid":"#11:13138"}]

What's going on? How do I get at the full result from Oriento? Do I have to select each rid directly? 
Reply all
Reply to author
Forward
0 new messages