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 2021/04/28 19:11:00 UTC
[jira] [Assigned] (TINKERPOP-1804) Has step doesn't consider
strategy vertexProperty filters
[ https://issues.apache.org/jira/browse/TINKERPOP-1804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Mallette reassigned TINKERPOP-1804:
-------------------------------------------
Assignee: (was: Stephen Mallette)
> Has step doesn't consider strategy vertexProperty filters
> ---------------------------------------------------------
>
> Key: TINKERPOP-1804
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1804
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.2.3
> Reporter: Simone Cattani
> Priority: Major
>
> Has step, when used in a traversal defined with strategies, doesn't consider filters applied on properties by the strategies
> Let's consider the crew example adding an old location for Marko, in Seattle, the current Matthias' location.
> {code}
> graph = TinkerFactory.createTheCrew()
> g = graph.traversal()
> g.V().has('name', 'marko').property('location', 'seattle', 'startTime', 1994, 'endTime', 1997)
> {code}
> Defining a strategy that considers just current location I can correctly obtain the list of current locations
> {code}
> g.withStrategies(SubgraphStrategy.build().vertexProperties(or(hasLabel(neq('location')),hasNot('endTime'))).create()).V().hasLabel("person").valueMap()
> ==>[name:[marko],location:[santa fe]]
> ==>[name:[stephen],location:[purcellville]]
> ==>[name:[matthias],location:[seattle]]
> ==>[name:[daniel],location:[aachen]]
> {code}
> But requiring people (currently) living in Seattle, I obtain Marko, too
> {code}
> g.withStrategies(SubgraphStrategy.build().vertexProperties(or(hasLabel(neq('location')),hasNot('endTime'))).create()).V().hasLabel("person").has('location', 'seattle').valueMap()
> ==>[name:[marko],location:[santa fe]]
> ==>[name:[matthias],location:[seattle]]
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)