In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "neo4j how to quickly query sub-graph," interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "neo4j how to quickly query sub-graphs"!
1. defined
The process of searching subgraphs uses a similar approach to path extension, starting from a specified node, traversing along a particular relationship type, and returning all nodes and relationships that can be reached.
APOC provides two processes for searching subgraphs:
- subgraphNodes(): Returns only reachable nodes;
- subgraphAll(): Returns nodes and relationships.
Unlike the path extension procedures expand and expandConfig, they do not return all paths.
2. application
The process of searching a subgraph does not traverse all possible paths (i.e. all possible sequences of nodes and edges) and is therefore better than the path extension process in terms of both efficiency and cost. Applicable scenarios include:
- Find the k-nearest neighbors of a node;
- jud whether node are connected;
- Divide a graph into subgraphs.
Rational use of CALL apoc. path. subgraphNodes
MATCH (intopice:Intopiece) WHERE intopice.order_number = "To be entered"CALL apoc.path.subgraphNodes(intopice, {maxLevel:1}) YIELD nodeturn node.order_number as order_number ,node.into_state as into_state,node.roster_type as roster_type---MATCH (intopice:Intopiece) WHERE intopice.order_number = "To be entered"CALL apoc.path.subgraphNodes(intopice, {maxLevel:2}) YIELD nodeturn node.order_number as order_number ,node.into_state as into_state,node.roster_type as roster_type to this, I believe that everyone has a deeper understanding of"neo4j how to quickly query sub-graphs," so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.