Mmh,
for this, you would need a bit more power, as paging support for
generic result sets is not part of the server right now. Since you
need to handle state (having a list or set to hold your results before
returning the 20 best suitable) you could either use a scripting
language like Gremlin or Javascript with a suitable Server Plugin to
do this for you (along the lines of
https://github.com/peterneubauer/neo4j-gremlin-plugin/blob/master/src/main/java/org/neo4j/server/plugin/gremlin/GremlinPlugin.java)
or write a Java Plugin to do this.

If you need help with that, contact me off list, and we can work something out!

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Mar 29, 2011 at 10:35 PM, Justine Mathews
<[email protected]> wrote:
> Hi Peter,
>
>
>
> Please find below the Traverse I am using to find out the paths, when path
> returned is more its taking more time and sometimes rest json results
> truncating.. Suppose we can specify only certain number of paths need to be
> returned. It will solve the issue, and also its our business requirement to
> show number paths, say 20 paths
>
> (I mean the first paths in the priority of maxdepth). How could I specify it
> in the traverse.
>
>
>
> {"order": "depth first","relationships": [
>
>   {
>
>     "type": "Friend",
>
>     "direction": "all"
>
>   }
>
> ],"return filter": {
>
>   "language": "javascript",
>
>   "body": "position.length() > 0 &&
> position.lastRelationship().getProperty(\"customerId\",0) == 0"
>
> },"max depth": 6,"algorithm": "allPaths","to":
> "http://localhost:7474/db/data/node/546"}
>
>
>
> --
>
> Regards,
> Justine K Mathews, MCSD.NET
> Mob: +44-(0)
> 7795268546
>
> http://www.justinemathews.com
>
> http://uk.linkedin.com/in/justinemathews
>
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to