Message from discussion
Spatial noob exception "Index with the same name but different config exists!"
Received: by 10.66.90.5 with SMTP id bs5mr3063920pab.35.1348587957440;
Tue, 25 Sep 2012 08:45:57 -0700 (PDT)
X-BeenThere: neo4j@googlegroups.com
Received: by 10.68.225.39 with SMTP id rh7ls1180304pbc.7.gmail; Tue, 25 Sep
2012 08:45:54 -0700 (PDT)
Received: by 10.66.76.130 with SMTP id k2mr3661885paw.16.1348587954398;
Tue, 25 Sep 2012 08:45:54 -0700 (PDT)
Received: by 10.66.76.130 with SMTP id k2mr3661884paw.16.1348587954385;
Tue, 25 Sep 2012 08:45:54 -0700 (PDT)
Return-Path: <michael.hun...@neopersistence.com>
Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42])
by gmr-mx.google.com with ESMTPS id p7si219503pby.0.2012.09.25.08.45.54
(version=TLSv1/SSLv3 cipher=OTHER);
Tue, 25 Sep 2012 08:45:54 -0700 (PDT)
Received-SPF: pass (google.com: domain of michael.hun...@neopersistence.com designates 209.85.220.42 as permitted sender) client-ip=209.85.220.42;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of michael.hun...@neopersistence.com designates 209.85.220.42 as permitted sender) smtp.mail=michael.hun...@neopersistence.com
Received: by padfa1 with SMTP id fa1so1762088pad.15
for <neo4j@googlegroups.com>; Tue, 25 Sep 2012 08:45:54 -0700 (PDT)
d=google.com; s=20120113;
h=from:mime-version:content-type:subject:date:in-reply-to:to
:references:message-id:x-mailer:x-gm-message-state;
bh=b5l/jS1d6+AKAKyvlZBYyJxiYS9ZzjFGhakhQHt8L9g=;
b=mv0BWkozSq44ex1kSB21RJatHkVoSRG3pk2zvsWgDK44dDzzXVW18MidhwwS1/amZb
o4whm+G2PqfOWQwgCg4deTbupNX3vGMVUwtSf1gDzUPuU6aw1xctcFdZRPi1SFZpN7hr
2fFNcEzxZ7L2nK6NGyNyzBDvCPPNNw7QqogcoDuHc6ojIdO6BUC4LkW/T76aF/R9V3EA
e5ifqMR4fCgkTgDqnl4QTw5dVzYwOA1ShTCOHmpighYYBspluxRqAimAHqJfrZOnyIAu
SkdUBj4kZQuKWkV0heRFk3cL5+/O3OjDCWepmwpUeFMbNs321WUXX3f9cfNxWcHU+bEd
tydQ==
Received: by 10.68.212.70 with SMTP id ni6mr47055246pbc.22.1348587954055;
Tue, 25 Sep 2012 08:45:54 -0700 (PDT)
Return-Path: <michael.hun...@neopersistence.com>
Received: from [10.11.1.205] (206.111.142.135.ptr.us.xo.net. [206.111.142.135])
by mx.google.com with ESMTPS id ky6sm510319pbc.18.2012.09.25.08.45.52
(version=TLSv1/SSLv3 cipher=OTHER);
Tue, 25 Sep 2012 08:45:52 -0700 (PDT)
From: Michael Hunger <michael.hun...@neotechnology.com>
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: multipart/alternative; boundary=Apple-Mail-165-913564101
Subject: Re: [Neo4j] Spatial noob exception "Index with the same name but different config exists!"
Date: Tue, 25 Sep 2012 08:45:51 -0700
In-Reply-To: <9b112b76-5a9d-40f0-9f13-c918c34b2fb9@googlegroups.com>
To: neo4j@googlegroups.com
References: <5130f073-1e89-4122-99b2-861ab85203a1@googlegroups.com> <CAF59RW6i8jJWLhqtJyuZKy6ThPwF-y9YhdBpsd7f95cKdnu...@mail.gmail.com> <10d45633-040c-4e42-a13b-13278588e11d@googlegroups.com> <CAF59RW7TPsC16i0UKJb7OU_3rODKGqxKYWS+_JxpCkuRmet...@mail.gmail.com> <310897d3-89df-4d1e-a795-8a5d6e8988db@googlegroups.com> <CAO1LoTvXqed89g5xtBpRYoWRZCdGvW7NGeVJzCu0yG3LKSx...@mail.gmail.com> <CAE2kSFegbc87E2ObtLXdzezRD4JEmjHTwG7fKGgbrjRZnZF...@mail.gmail.com> <9b112b76-5a9d-40f0-9f13-c918c34b2fb9@googlegroups.com>
Message-Id: <24B41868-A835-46FA-B633-E27800469...@neotechnology.com>
X-Mailer: Apple Mail (2.1084)
X-Gm-Message-State: ALoCoQkPY5BA/mfmiBRPhJNFyK9FLw/oGqc2y7oqLr7S1NrYou2zu15hQn1wujQNSZpAgZ9E3NUu
--Apple-Mail-165-913564101
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
Can you share the full exception stacktrace?
And could you upgrade to SDN-rest 2.1.0.RC4 ?
And remove the explicit rest-graphdb dependency ?
I think there was an issue with index type-checking in the rest-graphdb =
but am not sure.
A sample project would be great though !
Michael
Am 25.09.2012 um 06:59 schrieb Michael Janiak:
> Hi Chris, sorry but that is way over my head. At the moment I'm =
literally having a problem with executing the code I pasted earlier =
http://pastebin.com/DR1B9mu9. I initially thought there was a problem =
with having multiple nodes of a similar POINT index but you seem to be =
saying that that is not the case. Are you saying that I'm inadvertently =
creating two layers of the same name? How could I change the above code =
to correct that?
>=20
> Could it be something to do with the fact that I use a REST database =
for my test context?
>=20
> <neo4j:config graphDatabaseService=3D"graphDatabaseService"/>
> <bean id=3D"graphDatabaseService"=20
> =
class=3D"org.springframework.data.neo4j.rest.SpringRestGraphDatabase">
> <constructor-arg index=3D"0" =
value=3D"http://localhost:7474/db/data" />
> </bean>
>=20
>=20
>=20
> On Monday, September 24, 2012 12:12:40 PM UTC-4, Craig Taverner wrote:
> Going back to the first email, I noticed that the error message was =
"Index with the same name but different config exists!". I should =
mention that this has nothing to do with features being similar or =
identical. It is about the definition of the layer. Since we allow the =
layers to have custom code for mapping custom domain models into =
geometries, this knowledge is embedded in the layer in a dynamic way. =
For example, we provide three built-in types of layers, OSMLayer, =
SimplePointLayer and EditableLayerImpl (for WKT). If you try to create =
two layers with the same name, but different types, you will get the =
error you see above.
>=20
> I must assume that you have code that tries to create the layer a =
second time, and the second time it does not specify the layer type and =
gets the default choice (probably EditableLayerImpl). But the first time =
it was created with some other type, perhaps SimplePointLayer if you are =
storing only simple lat/long locations (seems to be the case).
>=20
>=20
> On Mon, Sep 24, 2012 at 10:26 AM, Lasse Westh-Nielsen =
<lasse.wes...@neopersistence.com> wrote:
> Michael,
>=20
> The code you shared seems to work, for me at least - I have put it =
into a single file test here, using just an in-memory db:
>=20
> https://gist.github.com/3774902
>=20
> Interestingly, when I add the cleanup bit I get a problem with =
Node[0], not sure why - but don't think it has to do with spatial =
necessarily.
>=20
>=20
>=20
> On Fri, Sep 21, 2012 at 11:32 PM, Michael Janiak =
<michael...@gmail.com> wrote:
> Hi Peter, thank you for these rapid responses!
>=20
> I use the Neo4jHelper to clean the database before each test. I've =
been using it for all my other tests and it's been working so far.
>=20
> Here's all the pertinent code: http://pastebin.com/DR1B9mu9
>=20
>=20
>=20
> On Friday, September 21, 2012 6:14:07 PM UTC-4, Peter Neubauer wrote:
> What is Neo4jHelper.cleanDb(template); doing?=20
>=20
> Do you have that test isolated standalone somewhere? We might be able=20=
> to recreate it and add it to the standard SDN tests ...=20
>=20
> Cheers,=20
>=20
> /peter neubauer=20
>=20
> Neo4j 1.8.RC1 "Vindeln Vy" -=20
> http://blog.neo4j.org/2012/09/neo4j-18rc1-really-careful-ftw.html=20
>=20
> G: neubauer.peter=20
> S: peter.neubauer=20
> P: +46 704 106975=20
> L: http://www.linkedin.com/in/neubauer=20
> T: @peterneubauer=20
>=20
> Wanna learn something new? Come to @graphconnect.=20
>=20
>=20
> On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak=20
> <michael...@gmail.com> wrote:=20
> > I should have mentioned, I clean the database before every test like =
so:=20
> >=20
> > @RunWith(SpringJUnit4ClassRunner.class)=20
> > @ContextConfiguration("classpath:testContext.xml")=20
> > @Transactional=20
> > public class SpatialTest {=20
> >=20
> > @Rollback(false)=20
> > @BeforeTransaction=20
> > public void cleanUpGraph() {=20
> > Neo4jHelper.cleanDb(template);=20
> > }=20
> >=20
> >=20
> > Also I just tried deleting the whole database and running just this =
test and=20
> > I get the error exactly when the second node is saved.=20
> >=20
> > @Test=20
> > public void testNodes(){=20
> > for (int i =3D 0; i < vArray.length; i++) {=20
> > Venue venue =3D new Venue();=20
> > venue.setLocation(locArray[i][1], locArray[i][0]);=20
> > System.out.println(i+": "+venue.getLocation());=20
> > venue =3D template.save(venue);=20
> > }=20
> > Set<Venue> nodes =3D (Set<Venue>) venueRep.findAll();=20
> > assertEquals(nodes.size(),5);=20
> > }=20
> >=20
> >=20
> >=20
> >=20
> >=20
> >=20
> > On Friday, September 21, 2012 5:00:34 PM UTC-4, Peter Neubauer =
wrote:=20
> >>=20
> >> Michael,=20
> >> are all the tests failing like this or might there be an issue with=20=
> >> the database not being totally clean before runs?=20
> >>=20
> >> Cheers,=20
> >>=20
> >> /peter neubauer=20
> >>=20
> >> Neo4j 1.8.RC1 "Vindeln Vy" -=20
> >> http://blog.neo4j.org/2012/09/neo4j-18rc1-really-careful-ftw.html=20=
> >>=20
> >> G: neubauer.peter=20
> >> S: peter.neubauer=20
> >> P: +46 704 106975=20
> >> L: http://www.linkedin.com/in/neubauer=20
> >> T: @peterneubauer=20
> >>=20
> >> Wanna learn something new? Come to @graphconnect.=20
> >>=20
> >>=20
> >> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak=20
> >> <michael...@gmail.com> wrote:=20
> >> > Hi All,=20
> >> >=20
> >> > I'm to get some Spatial basics under my belt but after fiddling =
around=20
> >> > with=20
> >> > spatial all afternoon I'm stuck at what seems like the most =
trivial of=20
> >> > problems. ( I actually ran into this same problem in previous =
attempts=20
> >> > and=20
> >> > ended up abandoning my efforts )=20
> >> >=20
> >> > I'm using the spatial example in the Good Relationships manual =
and=20
> >> > Michael's=20
> >> > post as a starting point. I'm using venues from New York City but =
when I=20
> >> > run=20
> >> > a unit test, I get an "Index with the same name but different =
config=20
> >> > exists!" exception. I suppose that this has something to do with =
points=20
> >> > needing to be unique and receiving the same wkt value if they're =
close=20
> >> > together. But it seems like that should be something expected =
from real=20
> >> > life, for example, you can have multiple "venues" in an office =
block.=20
> >> >=20
> >> > Is there something obvious I'm missing here???=20
> >> >=20
> >> > As always, thank you in advance!=20
> >> >=20
> >> > As an FYI, I'm using the following Venue class and I tried =
defining the=20
> >> > wkt=20
> >> > as both %.2f and %s, which I've also seen used.=20
> >> >=20
> >> > @NodeEntity=20
> >> > public class Venue {=20
> >> > @GraphId private Long graphId;=20
> >> > @Indexed(indexType =3D IndexType.POINT, indexName =3D =
"VenueLocation")=20
> >> > private String wkt;=20
> >> >=20
> >> > public void setLocation(float lon, float lat) {=20
> >> > this.wkt =3D String.format("POINT( %.2f %.2f )",lon,lat);=20
> >> > }=20
> >> >=20
> >> > }=20
> >> >=20
> >> > public interface VenueRepository extends GraphRepository<Venue>,=20=
> >> > SpatialRepository<Venue>{}=20
> >> >=20
> >> >=20
> >> > And for the unit test I'm just doing this:=20
> >> >=20
> >> > @Autowired private VenueRepository venueRep;=20
> >> >=20
> >> >=20
> >> > @Test=20
> >> > public void test2FiveNodes(){=20
> >> > for (int i =3D 0; i < vArray.length; i++) {=20
> >> > Venue venue =3D new Venue();=20
> >> > venue.setLocation(locArray[i][1], locArray[i][0]);=20
> >> > venue =3D venueRep.save(venue);=20
> >> > }=20
> >> > }=20
> >> >=20
> >> >=20
> >> >=20
> >> > --=20
> >> >=20
> >> >=20
> >=20
> > --=20
> >=20
> >=20
>=20
> --=20
> =20
> =20
>=20
>=20
> --=20
> =20
> =20
>=20
>=20
> --=20
> =20
> =20
--Apple-Mail-165-913564101
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=us-ascii
<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Can =
you share the full exception stacktrace?<div><br></div><div>And could =
you upgrade to SDN-rest 2.1.0.RC4 ?</div><div><br></div><div>And remove =
the explicit rest-graphdb dependency ?</div><div><br></div><div>I think =
there was an issue with index type-checking in the rest-graphdb but am =
not sure.</div><div><br></div><div>A sample project would be great =
though !</div><div><br></div><div>Michael</div><div><br><div><div>Am =
25.09.2012 um 06:59 schrieb Michael Janiak:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite">Hi Chris, =
sorry but that is way over my head. At the moment I'm literally having a =
problem with executing the code I pasted earlier
<a =
href=3D"http://pastebin.com/DR1B9mu9">http://pastebin.com/DR1B9mu9</a>.&nb=
sp;I initially thought there was a problem with having multiple nodes of =
a similar POINT index but you seem to be saying that that is not the =
case. Are you saying that I'm inadvertently creating two layers of the =
same name? How could I change the above code to correct =
that?<div><br></div><div>Could it be something to do with the fact that =
I use a REST database for my test =
context?</div><div><br></div><div><div><span class=3D"Apple-tab-span" =
style=3D"white-space:pre"> </span><neo4j:config =
graphDatabaseService=3D"graphDatabaseService"/></div><div><span =
class=3D"Apple-tab-span" style=3D"white-space:pre"> </span><bean =
id=3D"graphDatabaseService" </div><div><span class=3D"Apple-tab-span"=
style=3D"white-space:pre"> =
</span>class=3D"org.springframework.data.neo4j.rest.SpringRestGraphDatabas=
e"></div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">=
</span> <constructor-arg index=3D"0" value=3D"<a =
href=3D"http://localhost:7474/db/data">http://localhost:7474/db/data</a>" =
/></div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre"> =
</span></bean></div></div><div><br></div><div><br><br>On Monday, =
September 24, 2012 12:12:40 PM UTC-4, Craig Taverner wrote:<blockquote =
class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: =
1px #ccc solid;padding-left: 1ex;">Going back to the first email, I =
noticed that the error message was <span =
style=3D"font-family:arial,sans-serif;font-size:12.800000190734863px;backg=
round-color:rgb(255,255,255)"><i><font color=3D"#000099">"Index with the =
same name but different config exists!". </font></i></span>I should =
mention that this has nothing to do with features being similar or =
identical. It is about the definition of the layer. Since we allow the =
layers to have custom code for mapping custom domain models into =
geometries, this knowledge is embedded in the layer in a dynamic way. =
For example, we provide three built-in types of layers, OSMLayer, =
SimplePointLayer and EditableLayerImpl (for WKT). If you try to create =
two layers with the same name, but different types, you will get the =
error you see above.<div>
<br></div><div>I must assume that you have code that tries to create the =
layer a second time, and the second time it does not specify the layer =
type and gets the default choice (probably EditableLayerImpl). But the =
first time it was created with some other type, perhaps SimplePointLayer =
if you are storing only simple lat/long locations (seems to be the =
case).</div>
<div><div><br><br><div class=3D"gmail_quote">On Mon, Sep 24, 2012 at =
10:26 AM, Lasse Westh-Nielsen <span dir=3D"ltr"><<a =
href=3D"javascript:" target=3D"_blank" =
gdf-obfuscated-mailto=3D"b7Fzj5-3jh4J">lasse.wes...@<wbr>neopersistence.co=
m</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc =
solid;padding-left:1ex">Michael,<div><br></div><div>The code you shared =
seems to work, for me at least - I have put it into a single file test =
here, using just an in-memory db:</div>
<div><br></div><div><a href=3D"https://gist.github.com/3774902" =
target=3D"_blank">https://gist.github.com/<wbr>3774902</a></div>
<div><br></div><div>Interestingly, when I add the cleanup bit I get a =
problem with Node[0], not sure why - but don't think it has to do with =
spatial necessarily.</div><div><div><div><br></div><div><br><br>
<div class=3D"gmail_quote">
On Fri, Sep 21, 2012 at 11:32 PM, Michael Janiak <span dir=3D"ltr"><<a =
href=3D"javascript:" target=3D"_blank" =
gdf-obfuscated-mailto=3D"b7Fzj5-3jh4J">michael...@gmail.com</a>></span>=
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Peter, thank you for these rapid responses!<div><br></div><div>I use =
the Neo4jHelper to clean the database before each test. I've been using =
it for all my other tests and it's been working so far.</div><div><br>
</div><div>Here's all the pertinent code: <a =
href=3D"http://pastebin.com/DR1B9mu9" =
target=3D"_blank">http://pastebin.com/<wbr>DR1B9mu9</a></div><div><br></di=
v><div><div><br><br>On Friday, September 21, 2012 6:14:07 PM UTC-4, =
Peter Neubauer wrote:</div>
<blockquote class=3D"gmail_quote" =
style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div>What is Neo4jHelper.cleanDb(template); =
doing?
<br>
<br>Do you have that test isolated standalone somewhere? We might be =
able
<br>to recreate it and add it to the standard SDN tests ...
<br>
<br>Cheers,
<br>
<br>/peter neubauer
<br>
<br>Neo4j 1.8.RC1 "Vindeln Vy" -
<br><a =
href=3D"http://blog.neo4j.org/2012/09/neo4j-18rc1-really-careful-ftw.html"=
=
target=3D"_blank">http://blog.neo4j.org/2012/09/<u></u><wbr>neo4j-18rc1-re=
ally-careful-<u></u>ftw<wbr>.html</a>
<br>
<br>G: neubauer.peter
<br>S: peter.neubauer
<br>P: <a value=3D"+46704106975">+46 704 106975</a>
<br>L: <a href=3D"http://www.linkedin.com/in/neubauer" =
target=3D"_blank">http://www.linkedin.com/in/<u></u>neu<wbr>bauer</a>
<br>T: @peterneubauer
<br>
<br>Wanna learn something new? Come to @graphconnect.
<br>
<br>
<br>On Fri, Sep 21, 2012 at 3:08 PM, Michael Janiak
<br></div><div><div><<a>michael...@gmail.com</a>> wrote:
<br>> I should have mentioned, I clean the database before every test =
like so:
<br>>
<br>> @RunWith(<u></u>SpringJUnit4ClassRunn<wbr>er.class)
<br>> @ContextConfiguration("<u></u>classpa<wbr>th:testContext.xml")
<br>> @Transactional
<br>> public class SpatialTest {
<br>>
<br>> @Rollback(false)
<br>> @BeforeTransaction
<br>> public void cleanUpGraph() {
<br>> Neo4jHelper.cleanDb(template);
<br>> }
<br>>
<br>>
<br>> Also I just tried deleting the whole database and running just =
this test and
<br>> I get the error exactly when the second node is saved.
<br>>
<br>> @Test
<br>> public void testNodes(){
<br>> for (int i =3D 0; i < vArray.length; i++) {
<br>> Venue venue =3D new Venue();
<br>> venue.setLocation(locArray[i][<u></u><wbr>1], locArray[i][0]);
<br>> System.out.println(i+": "+venue.getLocation());
<br>> venue =3D template.save(venue);
<br>> }
<br>> Set<Venue> nodes =3D (Set<Venue>) =
venueRep.findAll();
<br>> assertEquals(nodes.size(),5);
<br>> }
<br>>
<br>>
<br>>
<br>>
<br>>
<br>>
<br>> On Friday, September 21, 2012 5:00:34 PM UTC-4, Peter Neubauer =
wrote:
<br>>>
<br>>> Michael,
<br>>> are all the tests failing like this or might there be an =
issue with
<br>>> the database not being totally clean before runs?
<br>>>
<br>>> Cheers,
<br>>>
<br>>> /peter neubauer
<br>>>
<br>>> Neo4j 1.8.RC1 "Vindeln Vy" -
<br>>> <a =
href=3D"http://blog.neo4j.org/2012/09/neo4j-18rc1-really-careful-ftw.html"=
=
target=3D"_blank">http://blog.neo4j.org/2012/09/<u></u><wbr>neo4j-18rc1-re=
ally-careful-<u></u>ftw<wbr>.html</a>
<br>>>
<br>>> G: neubauer.peter
<br>>> S: peter.neubauer
<br>>> P: <a value=3D"+46704106975">+46 704 106975</a>
<br>>> L: <a href=3D"http://www.linkedin.com/in/neubauer" =
target=3D"_blank">http://www.linkedin.com/in/<u></u>neu<wbr>bauer</a>
<br>>> T: @peterneubauer
<br>>>
<br>>> Wanna learn something new? Come to @graphconnect.
<br>>>
<br>>>
<br>>> On Fri, Sep 21, 2012 at 1:54 PM, Michael Janiak
<br>>> <<a>michael...@gmail.com</a>> wrote:
<br>>> > Hi All,
<br>>> >
<br>>> > I'm to get some Spatial basics under my belt but after =
fiddling around
<br>>> > with
<br>>> > spatial all afternoon I'm stuck at what seems like the =
most trivial of
<br>>> > problems. ( I actually ran into this same problem in =
previous attempts
<br>>> > and
<br>>> > ended up abandoning my efforts )
<br>>> >
<br>>> > I'm using the spatial example in the Good =
Relationships manual and
<br>>> > Michael's
<br>>> > post as a starting point. I'm using venues from New =
York City but when I
<br>>> > run
<br>>> > a unit test, I get an "Index with the same name but =
different config
<br>>> > exists!" exception. I suppose that this has something =
to do with points
<br>>> > needing to be unique and receiving the same wkt value =
if they're close
<br>>> > together. But it seems like that should be something =
expected from real
<br>>> > life, for example, you can have multiple "venues" in =
an office block.
<br>>> >
<br>>> > Is there something obvious I'm missing here???
<br>>> >
<br>>> > As always, thank you in advance!
<br>>> >
<br>>> > As an FYI, I'm using the following Venue class and I =
tried defining the
<br>>> > wkt
<br>>> > as both %.2f and %s, which I've also seen used.
<br>>> >
<br>>> > @NodeEntity
<br>>> > public class Venue {
<br>>> > @GraphId private Long graphId;
<br>>> > @Indexed(indexType =3D IndexType.POINT, indexName =3D =
"VenueLocation")
<br>>> > private String wkt;
<br>>> >
<br>>> > public void setLocation(float lon, float lat) {
<br>>> > this.wkt =3D String.format("POINT( %.2f %.2f =
)",lon,lat);
<br>>> > }
<br>>> >
<br>>> > }
<br>>> >
<br>>> > public interface VenueRepository extends =
GraphRepository<Venue>,
<br>>> > SpatialRepository<Venue>{}
<br>>> >
<br>>> >
<br>>> > And for the unit test I'm just doing this:
<br>>> >
<br>>> > @Autowired private VenueRepository venueRep;
<br>>> >
<br>>> >
<br>>> > @Test
<br>>> > public void test2FiveNodes(){
<br>>> > for (int i =3D 0; i < vArray.length; i++) {
<br>>> > Venue venue =3D new Venue();
<br>>> > venue.setLocation(locArray[i][<u></u><wbr>1], =
locArray[i][0]);
<br>>> > venue =3D venueRep.save(venue);
<br>>> > }
<br>>> > }
<br>>> >
<br>>> >
<br>>> >
<br>>> > --
<br>>> >
<br>>> >
<br>>
<br>> --
<br>>
<br>>
<br></div></div></blockquote></div><div><br =
class=3D"webkit-block-placeholder"></div>
-- <br>
<br>
<br>
</blockquote></div><br></div><div><br =
class=3D"webkit-block-placeholder"></div></div></div>
-- <br>
<br>
<br>
</blockquote></div><br></div></div>
</blockquote></div><div><br class=3D"webkit-block-placeholder"></div>
-- <br>
<br>
<br>
</blockquote></div><br></div></body></html>=
--Apple-Mail-165-913564101--