Neo4j: Match multiple labels (2 or more)

后端 未结 6 1115
轮回少年
轮回少年 2020-12-07 22:14

I would like to do a search, and I would like to start traversing from 2 labels (OR condition). For example, I need to find out all the nodes which have labels either \'Male

6条回答
  •  余生分开走
    2020-12-07 22:51

    As for v3.5, we can do:

    MATCH (n) WHERE (n:User OR n:Admin) AND n.name CONTAINS "ail" RETURN n
    

    and get:

    ╒══════════════════╕
    │"n"               │
    ╞══════════════════╡
    │{"name":"Abigail"}│
    ├──────────────────┤
    │{"name":"Bailee"} │
    └──────────────────┘
    

提交回复
热议问题