Starting from one vertex retrieve all connected documents

Hey,
starting from one vertex i traverse through graph. Then i want to retrieve only documents that are connected (by edges or links) with any depth to that vertex.
I’am still using Orientdb 2.2.16.

I had two issues, where i want to ask the community if there is a better solution available.

  1. I had to follow any outgoing edges and links
    -> I could not find a way to follow every link by wildcard, i had to specify it
    e.g. “traverse out(), link1, link2, link3,… from RID”
    Is there any generic solution?

  2. I want to determine on query-side, if it is a vertex or edge.
    -> First i used @this instanceof ‘V’ <> true but this worked in studio but not with java api.
    -> Then i did “eval(’@this instanceof “V”’) as isVertex” and filtered by isVertex = false later on.
    Is there a built-in approach to detect if it is not a vertex?

Regards
Marius

Hi, did you ever get it working?

Hi,
it runs with those two limitations.

  • We need to specify every (possible) linkname to traverse all
  • We use “eval(’@this instanceof “V”’) as isVertex” for evaluating if it is avertex.

In general this part of the application is really slow and we would be happy to get improvements there…