You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2022/03/16 10:38: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 ]
Stephen Mallette updated TINKERPOP-2713:
----------------------------------------
Issue Type: Improvement (was: New Feature)
> 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: Improvement
> Components: language
> Affects Versions: 3.6.0
> Reporter: Mike Personick
> Assignee: Mike Personick
> Priority: Minor
> Fix For: 3.6.0
>
>
> 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)