Tagged: neo4j Toggle Comment Threads | Keyboard Shortcuts

  • yalamber 9:07 am on January 22, 2018 Permalink | Reply
    Tags: , geoquery, neo4j   

    Find nodes near other nodes in neo4j

          MATCH (u:User) 
          WHERE u._id <> $_id
          WITH point({ longitude: u.longitude, latitude: u.latitude }) AS singlesPoint, 
               point({ longitude: $longitude, latitude: $latitude }) AS userPoint, u
          WITH distance(userPoint, singlesPoint) as distanceBetween, u
          WHERE $maxDistance < distanceBetween
          return u
          LIMIT $limit
    
     
  • yalamber 5:19 am on December 21, 2017 Permalink | Reply
    Tags: neo4j   

    Match Intersection with exact number of related nodes

    WITH ["Ram", "Sita", "Hari"] as names
    MATCH (u:User)-[:IS_PARTICIPANT]->(c:Conversation)
    WHERE u.name IN names
    WITH c, size(names) as inputCnt, count(DISTINCT u) as userCnt
    WHERE userCnt = inputCnt and size(()-[:IS_PARTICIPANT]->(c)) = inputCnt
    RETURN c
    
     
  • yalamber 8:50 am on July 30, 2017 Permalink | Reply
    Tags: , neo4j   

    Get specific label nodes without relation to specific label

    MATCH (d:District) WHERE NOT ((d)-[:LOCATED_IN]->(:Province)) RETURN d
    
     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel