Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2449

Get edges in a graph by label

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 3.4.8
    • None
    • structure, tinkergraph
    • None
    • java with tinkergraph and tp3Version=3.4.8

    Description

      Given the presence of a node with a self-referential edge with label 'root' I expect the following to get that node.

      List<Vertex> roots = g.E("root").outV().toList();
      

      The roots list is empty.

      The following work-around gives me what I expect.

      List<Vertex> roots = g.V().inE("root").outV().toList();
      

      Here is a graphml fragment that illustrates the problem.

      <?xml version="1.0" encoding="UTF-8"?>
      <graphml xmlns="http://graphml.graphdrawing.org/xmlns"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.1/graphml.xsd">
          <graph id="G" edgedefault="directed">
              <node id="0">
                  <data key="labelV">BLANK</data>
              </node>
              <node id="1">
                  <data key="labelV">component</data>
              </node>
       
              <edge id="2" source="1" target="1">
                  <data key="labelE">root</data>
              </edge>
          </graph>
      </graphml>
      

      I believe this has been a problem for a while...
      https://groups.google.com/g/gremlin-users/c/wVOnJAvHSSU

      Attachments

        Activity

          People

            Unassigned Unassigned
            phreed Fredrick Eisele
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: