The order of breadth first within one depth is not guaranteed.

You will always get `A` first and then `B`,`C`,`D`,`E` in any order 
followed by `F`,`G`,`H` in any order.
The only way to get the node's in your preferred order is by using `sort`.


Am Sonntag, 19. März 2017 07:12:34 UTC+1 schrieb Frank Russell:
>
> I have a tree like this
>
>
> |   |   |   | A |   |   |
> |---|---|---|---|---|---|
> |   | B |   | C | D | E |
> | F | G | H |   |   |   |
>
>
> edge collection:
> [
>   {
>     "_key": "1",
>     "_from": "columns/0",
>      "_to": "columns/1"
>   },
>   {
>     "_key": "2",
>     "_from": "columns/1",
>     "_to": "columns/2"
>   },
>   {
>     "_key": "3",
>     "_from": "columns/1",
>      "_to": "columns/3"
>   },
>   {
>     "_key": "4",
>     "_from": "columns/1",
>     "_to": "columns/4"
>   },
>   {
>     "_key": "5",
>     "_from": "columns/1",
>      "_to": "columns/5"
>   },
>   {
>     "_key": "6",
>     "_from": "columns/2",
>     "_to": "columns/6"
>   },
>   {
>     "_key": "7",
>     "_from": "columns/2",
>      "_to": "columns/7"
>   },
>   {
>     "_key": "8",
>     "_from": "columns/2",
>     "_to": "columns/8"
>   }
> ]
>
>
> I query using:
> FOR v,e,p IN 1..3 OUTBOUND "columns/0" `bfs` OPTIONS {"bfs": true} RETURN 
> v.title
>
> result:
> [ "A",  "D",  "E",  "C",  "B",  "G",  "H",  "F"]
>
> Why not? [ "A",  "B",  "C",  "D",  "E",  "F",  "G",  "H"]
>
> Is it possible to return node from left to right without sort by e._key?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" 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