Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Go FROM query command,There is no way to tell which point is the beginning or end of the edge #1348

Closed
ttkyl opened this issue Aug 27, 2021 · 1 comment
Labels
question Type: question about the product

Comments

@ttkyl
Copy link

ttkyl commented Aug 27, 2021

GO 1 To 2 STEPS FROM "482680108" OVER tick_change BIDIRECT WHERE tick_change.day>=20210823 AND tick_change.day<=20210823 YIELD DISTINCT tick_change._src AS src,tick_change._dst AS dst,tick_change.nums AS nums,tick_change.day as day,tick_change.cnt as cnt,tick_change.total_cost AS cost,tick_change.total_win AS win,"tick_change" AS tagname

image
image

The relationship between these two edges is actually 482680108->(nums:20)->522902110. 522902110->(NUMS :20)-> 482680108, but there is no way to determine.
How should you write the go from command?

@wey-gu
Copy link

wey-gu commented Aug 30, 2021

try this:
tick_change._type > 0 means src -> dst and < 0 vise versa.

GO 1 To 2 STEPS FROM "482680108" OVER tick_change BIDIRECT YIELD tick_change._type

ref: https://docs.nebula-graph.io/2.0.1/3.ngql-guide/4.variable-and-composite-queries/3.property-reference/#for_built-in_properties

@wey-gu wey-gu added the question Type: question about the product label Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Type: question about the product
Projects
None yet
Development

No branches or pull requests

3 participants