Results 1 to 4 of 4

Thread: About how to use SDN template query results.

  1. #1
    Join Date
    Jun 2012
    Posts
    13

    Question About how to use SDN template query results.

    if i have a root node and some children nodes, the relationship is1:n(n <= 100000)(relation name is "INCLUDE"), and the children nodes have the different properties, but have at least name and groupid two properties for identity. due to cannot know how many properties for each children node, so i did not use @NodeEntity and @Repository, only used template.createNode(), and set the related peoperties for each children node, the children can also duplicate, then I should identify the duplicate node. and update it later by some query.

    so my question is use which method can query those quickly, i mean if found the name+groupid is existing, then mark this one as duplicate. if i don't use index, only by "Cypher" can implement this? i hope can do some query under this parent node=? and name=? and groupid=? like sql, then if results<>null, means this input children duplicate. how to write it by "Cypher".

    another question is do we have any good solution for paging function by template query, if i want to return an object like List<Map<String, String>>, one page view 10 lines, and the list only include 10 lines, one map is a node, for click next page, can view following 10 lines by children nodeid sort, for previous page can view last 10s. how to implements this function by template query?

    thanks for any helps!!!

  2. #2
    Join Date
    Jun 2012
    Posts
    13

    Default

    i decide only use Cypher script to query all node, and not use index, hope the performance is good.
    like below:
    START n=node(5)
    MATCH n-[*]->record
    WHERE record.name = "joey" and record.groupid="office1"
    RETURN record

  3. #3
    Join Date
    May 2012
    Posts
    107

    Default

    zgdnba,

    For Cypher-specific stuff, I think https://groups.google.com/group/neo4j is a good place to ask. Cypher _can_ do mutations, but the details I am not so sure about: http://www.slideshare.net/maxdemarzi...utating-cypher

    Lasse

  4. #4
    Join Date
    May 2012
    Posts
    107

    Default

    Quote Originally Posted by zgdnba View Post
    another question is do we have any good solution for paging function by template query, if i want to return an object like List<Map<String, String>>, one page view 10 lines, and the list only include 10 lines, one map is a node, for click next page, can view following 10 lines by children nodeid sort, for previous page can view last 10s. how to implements this function by template query?
    For paging, a good start is http://static.springsource.org/sprin...e/html/#d0e679

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •