Message from discussion
Neo4J Spatial - GeoPipeline pagination question
Received: by 10.216.91.80 with SMTP id g58mr2400710wef.3.1338365810195;
Wed, 30 May 2012 01:16:50 -0700 (PDT)
X-BeenThere: neo4j@googlegroups.com
Received: by 10.180.8.42 with SMTP id o10ls3507347wia.3.canary; Wed, 30 May
2012 01:16:47 -0700 (PDT)
Received: by 10.216.140.219 with SMTP id e69mr2400511wej.1.1338365807135;
Wed, 30 May 2012 01:16:47 -0700 (PDT)
Received: by 10.216.140.219 with SMTP id e69mr2400510wej.1.1338365807117;
Wed, 30 May 2012 01:16:47 -0700 (PDT)
Return-Path: <hanrisel...@gmail.com>
Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181])
by gmr-mx.google.com with ESMTPS id e10si5753507wiz.3.2012.05.30.01.16.47
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 30 May 2012 01:16:47 -0700 (PDT)
Received-SPF: pass (google.com: domain of hanrisel...@gmail.com designates 209.85.212.181 as permitted sender) client-ip=209.85.212.181;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of hanrisel...@gmail.com designates 209.85.212.181 as permitted sender) smtp.mail=hanrisel...@gmail.com; dkim=pass header...@gmail.com
Received: by wibhn14 with SMTP id hn14so3084004wib.16
for <neo4j@googlegroups.com>; Wed, 30 May 2012 01:16:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=3tu99op7IthSc9bxmISG122n7aCVY1ytpD0jKH0uyT8=;
b=AxDWEq3vZ7LDUWNfFHmq9YvZ/ar3MeOGqnXnFKaOcdLkbS14Xx2r4FaDuDys/yl9jF
DVH8PDbx5LjX+qgJQQciYGdLp0P+GllnkiPho26I2NB9AjsyZNb82NbdbEkIhUKBv3pH
pAUIFRTAcCjsOnezNcvADNvOeg1JgVF4mr7mf7qZ+m/cDHDwMNkpiRu+hQmaMd2QXqFZ
Wp71L/ayyUO5xcA8ELiVjFKxC6O9VKEi+v7iU2OmniDcJqP9Hi/nslrMiZSKL10DdQVk
+y/sN+dvPUNwUidALG/GIKnuv1BJ9HKg2PvT1Ow24LT26IrgZv1uwVPq0T6cBKgG8Vkv
cJ3Q==
MIME-Version: 1.0
Received: by 10.216.212.234 with SMTP id y84mr10043116weo.81.1338365806836;
Wed, 30 May 2012 01:16:46 -0700 (PDT)
Received: by 10.216.191.221 with HTTP; Wed, 30 May 2012 01:16:46 -0700 (PDT)
In-Reply-To: <CAF59RW7n=iMJFhdBuKK9dVyRfebeZAmpL1g75TS6TjnGti8...@mail.gmail.com>
References: <7315fe99-dcde-4b36-a1f2-5aca696f1c6a@googlegroups.com>
<CAF59RW7n=iMJFhdBuKK9dVyRfebeZAmpL1g75TS6TjnGti8...@mail.gmail.com>
Date: Wed, 30 May 2012 11:16:46 +0300
Message-ID: <CA+A8vzHJQisO3a-90w+Jt5nkembb6EVbi8Viqj5k234pYXU...@mail.gmail.com>
Subject: Re: [Neo4j] Neo4J Spatial - GeoPipeline pagination question
From: Eugen Paraschiv <hanrisel...@gmail.com>
To: neo4j@googlegroups.com
Content-Type: multipart/alternative; boundary=0016e6d590097f06fd04c13c92dd
--0016e6d590097f06fd04c13c92dd
Content-Type: text/plain; charset=ISO-8859-1
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.
On Wed, May 30, 2012 at 9:18 AM, Peter Neubauer <
peter.neuba...@neotechnology.com> wrote:
> 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
>
>
> On Mon, May 28, 2012 at 10:44 PM, Eugen Paraschiv <hanrisel...@gmail.com>
> wrote:
> > 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.
>
--0016e6d590097f06fd04c13c92dd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Well, is a polygon based search, so we may be getting sets of over 10000 (w=
ithout pagination of course) - that's not really practical to display s=
o 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 tota=
l number). <br>
On the solution of getting all of them and doing pagination in memory - tha=
t'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 rel=
atively standard pagination scenario - you ask for a range, and the result =
includes that range and also the total count of the result. <br>
Thanks. <br>Eugen. <br><br><div class=3D"gmail_quote">On Wed, May 30, 2012 =
at 9:18 AM, Peter Neubauer <span dir=3D"ltr"><<a href=3D"mailto:peter.ne=
uba...@neotechnology.com" target=3D"_blank">peter.neuba...@neotechnology.co=
m</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Well,<br>
how much results are you getting back? You might want to collect all<br>
results in a list and paginate that?<br>
<br>
Cheers,<br>
<br>
/peter neubauer<br>
<br>
G: =A0neubauer.peter<br>
S: =A0peter.neubauer<br>
P: =A0<a href=3D"tel:%2B46%20704%20106975" value=3D"+46704106975">+46 704 1=
06975</a><br>
L:=A0 =A0<a href=3D"http://www.linkedin.com/in/neubauer" target=3D"_blank">=
http://www.linkedin.com/in/neubauer</a><br>
T: =A0 @peterneubauer<br>
<br>
If you can write, you can code - @coderdojomalmo<br>
If you can sketch, you can use a graph database - @neo4j<br>
<br>
<br>
On Mon, May 28, 2012 at 10:44 PM, Eugen Paraschiv <<a href=3D"mailto:han=
risel...@gmail.com">hanrisel...@gmail.com</a>> wrote:<br>
> Hi,<br>
> I'm performing some paginated spatial searches (within a polygon):=
<br>
> (GeoPipeline) GeoPipeline.startIntersectWindowSearch(neo4JStorage,<br>
> polygon.getEnvelopeInternal()).withinFilter(polygon).range(from, to);<=
br>
> Everything works well - I'm getting the correct number of results =
(specified<br>
> by that range). I'm now trying to also get the total number of hit=
s from the<br>
> GeoPipeline result, but the API of that class is extremely diverse and=
I'm<br>
> not quite sure that what I'm trying to do is even possible.<br>
> Any help is greatly appreciated.<br>
> Thanks.<br>
> Eugen.<br>
</blockquote></div><br>
--0016e6d590097f06fd04c13c92dd--