0
  • nebula version: v3.4.1
  • Deployment method: distributed
  • Installation method: RPM
  • Whether to use the production environment: Y
  • hardware information:
    1. Disk (SSD recommended)
    2. CPU, memory information
  • Detailed description of the problem: Requirements: Find out the paths of foreign investment paths where the company is not in the "deregistered" state, and display up to 20 layers.

So in order to realize this requirement, the existing problems are:

subgraph is only for point filtering, which does not meet the requirements. Because the intermediate points of the path may satisfy is to return all paths Then this is the same as subgraph, and it should not meet the requirements. How should this requirement be expressed in words?

There are currently two ideas:

  1. Use Get Subgraph GET SUBGRAPH WITH PROP 20 STEPS FROM 815677140545765099 OUT Invest YIELD VERTICES as nodes, Edges as rels

But the question is how to filter the path of Company.shortstatus != "logout" in the statement?

  1. When using Match or Go, I always feel that there is a lack of expression, and I am also worried about performance problems. match p=(v:Company)-[r:Invest*1..20]->(dst) where id(v)==815677140545765099 and dst.Company.shortstatus!="Logout" return p

go 1 To 20 STEPS FROM 815677140545765099 OVER Invest where properties($$).shortstatus!="Logout" yield DISTINCT dst(edge) as id The idea of this go statement is to get the end point first, and then concurrently use FIND PATH to find the path

Now the question is:

Can subgraph filter in statement? In terms of business, it feels like a lot to filter 20 layers of data Although the expressions of match and go use indefinite long paths, they both meet the conditions at the end point. I am not sure whether this semantically meets the requirements. I initially thought that the semantics of match and go in the second method should be the same, but after testing, I found that the results were inconsistent

0 Answers0