[
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)