Announcement Announcement Module
Collapse
No announcement yet.
About how to use SDN template query results. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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

      Comment


      • #4
        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

        Comment

        Working...
        X