You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Mike Personick (Jira)" <ji...@apache.org> on 2022/02/24 14:51:00 UTC

[jira] [Updated] (TINKERPOP-2713) Create an element() step that maps a Property to its Element.

     [ https://issues.apache.org/jira/browse/TINKERPOP-2713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Personick updated TINKERPOP-2713:
--------------------------------------
    Description: 
There is currently no way to traverse from a Property to its Element in Gremlin. Add an element() operator (and ElementStep) that will accomplish this.

 
{code:java}
// Vertex -> VertexProperty -> Vertex
g.V(1).properties().limit(1).element() => v[1]

// Edge -> Property -> Edge
g.E(2).properties().limit(1).element() => e[2]

// Vertex -> VertexProperty -> Property -> VertexProperty -> Vertex
g.V(1).properties().properties().limit(1).element().element() => v[1] {code}
 

 

Example use case for this would be service calls that return properties (e.g. full-text search), which could then be traversed to their owning element.

  was:
There is currently no way to traverse from a Property to its Element in Gremlin. Add an element() operator (and ElementStep) that will accomplish this.

{{
g.V(1).properties().limit(1).element() => v[1]
}}

Use case for this would be full-text search service calls that return properties, which could then be traversed to their owning element.


> Create an element() step that maps a Property to its Element.
> -------------------------------------------------------------
>
>                 Key: TINKERPOP-2713
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2713
>             Project: TinkerPop
>          Issue Type: New Feature
>          Components: language
>    Affects Versions: 3.6.0
>            Reporter: Mike Personick
>            Priority: Minor
>
> There is currently no way to traverse from a Property to its Element in Gremlin. Add an element() operator (and ElementStep) that will accomplish this.
>  
> {code:java}
> // Vertex -> VertexProperty -> Vertex
> g.V(1).properties().limit(1).element() => v[1]
> // Edge -> Property -> Edge
> g.E(2).properties().limit(1).element() => e[2]
> // Vertex -> VertexProperty -> Property -> VertexProperty -> Vertex
> g.V(1).properties().properties().limit(1).element().element() => v[1] {code}
>  
>  
> Example use case for this would be service calls that return properties (e.g. full-text search), which could then be traversed to their owning element.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)