Neo4J Spatial - GeoPipeline pagination question

83 views
Skip to first unread message

Eugen Paraschiv

unread,
May 28, 2012, 4:44:40 PM5/28/12
to ne...@googlegroups.com
Hi,
I'm performing some paginated spatial searches (within a polygon):
(GeoPipeline) GeoPipeline.startIntersectWindowSearch(neo4JStorage, polygon.getEnvelopeInternal()).withinFilter(polygon).range(from, to);
Everything works well - I'm getting the correct number of results (specified by that range). I'm now trying to also get the total number of hits from the GeoPipeline result, but the API of that class is extremely diverse and I'm not quite sure that what I'm trying to do is even possible.
Any help is greatly appreciated.
Thanks.
Eugen.

Peter Neubauer

unread,
May 30, 2012, 2:18:51 AM5/30/12
to ne...@googlegroups.com
Well,
how much results are you getting back? You might want to collect all
results in a list and paginate that?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

If you can write, you can code - @coderdojomalmo
If you can sketch, you can use a graph database - @neo4j

Eugen Paraschiv

unread,
May 30, 2012, 4:16:46 AM5/30/12
to ne...@googlegroups.com
Well, is a polygon based search, so we may be getting sets of over 10000 (without pagination of course) - that's not really practical to display so my thinking was to simply do a paginated search - retrieve a range (page) of these results, but be able to show the total number of results also (or at least if there are more to be had, even if I cannot get the actual total number).
On the solution of getting all of them and doing pagination in memory - that's certainly an option, but given the large number of results, I'd rather not if the API could help me there - especially since this is a relatively standard pagination scenario - you ask for a range, and the result includes that range and also the total count of the result.
Thanks.
Eugen.

Peter Neubauer

unread,
Jul 19, 2012, 2:02:17 PM7/19/12
to ne...@googlegroups.com
Mmh,

the pipes have a count() method that you can use?

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Wanna learn something new? Come to @graphconnect.
Reply all
Reply to author
Forward
0 new messages