Re: [Neo4j] See the graph in the Neo4J embedded db

2011-09-28 Thread Adriano Henrique de Almeida
Andrew, check out the download page:

http://neo4j.org/download/, you can find Neoclipse at the bottom of the
page.

Regards

2011/9/28 andrew ton 

>
>
> Hi noppanit,
>
> Thank you for your quick reply! I have checked
> http://wiki.neo4j.org/content/Neoclipse#Configuration about Neoclipse.
> Where can I find Neoclipse? The donwload page just show neo4j packages. I
> am using neo4j-community-1.5.M01 as REST server. In eclipse I use neo4j API
> to store data into embedded database.
>
> I really appreciate your help if you can give me clear information. Thank
> you!
>
> Regards,
>
>
> 
> From: noppanit 
> To: user@lists.neo4j.org
> Sent: Wednesday, September 28, 2011 1:33 PM
> Subject: Re: [Neo4j] See the graph in the Neo4J embedded db
>
> You could use neoclipse to see it.
>
> Sent from my BlackBerry® wireless device
>
> -Original Message-
> From: "tt6 [via Neo4j Community Discussions]" <
> ml-node+s438527n3377257...@n3.nabble.com>
> Date: Wed, 28 Sep 2011 13:23:29
> To: noppanit
> Subject: [Neo4j] See the graph in the Neo4J embedded db
>
>
>
>
>
> Hello,
> I have stored triples into the Neo4J embedded db, now I want to see the
> graph or data in the db. How can I do it?
>
> Thanks,
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
>
> ___
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377257.html
> To start a new topic under Neo4j Community Discussions, email
> ml-node+s438527n438527...@n3.nabble.com
> To unsubscribe from Neo4j Community Discussions, visit
> http://neo4j-community-discussions.438527.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=438527&code=bm9wcGFuaXQuY0BnbWFpbC5jb218NDM4NTI3fDExOTIzNzAyNjk=
>
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-See-the-graph-in-the-Neo4J-embedded-db-tp3377257p3377301.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] neo4jphp and some cypher question

2011-09-25 Thread Adriano Henrique de Almeida
Hi Filip,

if you need only those nodes who have the Geemente property, you can specify
it on the where clause. Example:

where a.Geemente and a.Geemente = 'Antwerpen'

with this, the verification for Antwerpen (lovely city, BTW) is only
executed if Geemente property exists on a node.

See if this helps, and if not, shout here :)

Cheers.

2011/9/25 Filip De Haes 

> I've executed the query in the cypher console. (Btw I had to turn
> FireBug ON before it accepted the double enters)
>
> START n=(1) match a--n where a.Gemeente='Antwerpen' return a
>
> a.Gemeente does not exist on Node[891]
>
> If I add the Gemeente-property on Node[891] and run the query again, he
> complains for a missing Gemeente-property at the next a--n result.
>
> So, the query checks each a--n correctly, but if there is no
> Gemeente-property present, it stops the query.
>
> This way it's not possible to search for a given key value if not all
> the nodes have the same set of keys.
>
> Greetings,
> Filip
>
> On 21/09/2011 22:56, Michael Hunger wrote:
> > Could you execute the query in the cypher console?
> >
> > Could you also try to pass in the value "Antwerpen" as a literal to
> check?
> >
> > START n=(1) match a--n WHERE a.name= 'Antwerpen' RETURN a
> >
> > // try to add the order by after the query suceeded, might be that you
> have to use a.name? for that
> > ORDER by a.name
> >
> > It could be that an error is consumed by the php client.
> >
> > Cheers
> >
> > Michael
> >
> > Am 21.09.2011 um 21:18 schrieb Peter Neubauer:
> >
> >> Filip,
> >> yes, the where clause right now is filtering on the results of the
> >> MATCH clauses results. As such, if the property is not on the node, it
> >> will not be found, but you can of course use it is a starting lookup
> >> query. However, I think Andres is working towards being able to detect
> >> that properties are indexed and thus find it. For that, we need index
> >> introspection (knowing what properties of a node are indexed, in what
> >> indexes) which is features to add to the index framework. If you have
> >> the property even on the node, the query should work as expected.
> >>
> >> Does that help?
> >>
> >> 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 Wed, Sep 21, 2011 at 6:44 PM, Filip De Haes
>  wrote:
> >>> Hi all,
> >>>
> >>> I've got a question about a cypher query.
> >>>
> >>> $queryText = "START n=(1) match a--n WHERE a.Gemeente return a";
> >>>
> >>> This query returns the two locations (Gemeente) I have entered as a
> >>> property of our buildings in the database. Hundred other buildings
> don't
> >>> have that property yet.
> >>>
> >>> So far so good.
> >>>
> >>> $queryText = "START n=(1) match a--n WHERE a.Gemeente= ? RETURN a ORDER
> >>> by a.name";
> >>>
> >>> I would expect this query to return one result (? = "Antwerpen" passed
> >>> through a variable as shown in the php examples). But it doesn't.
> >>> However when I look this up with Luke in the lucene index, I can find
> it.
> >>>
> >>> When I search with ->query() it works:
> >>> $theindex->query("Gemeente:Antwerpen") works as expected.
> >>>
> >>> $queryText = "START n=(1) match a--n WHERE a.name= ? RETURN a ORDER by
> >>> a.name";
> >>>
> >>> When I search for a building name property (all these buildings have a
> >>> name) it does work as expected.
> >>>
> >>> So it seems putting properties in the WHERE-clause that are not
> >>> generally available result in zero results. Or is it because I added
> >>> Gemeente property later on the index... I don't know.
> >>>
> >>> Greetings and thanks,
> >>> Filip
> >>> ___
> >>> Neo4j mailing list
> >>> User@lists.neo4j.org
> >>> https://lists.neo4j.org/mailman/listinfo/user
> >>>
> >> ___
> >> Neo4j mailing list
> >> User@lists.neo4j.org
> >> https://lists.neo4j.org/mailman/listinfo/user
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] how to get the User who has been B Followed who has Followed Back.

2011-09-20 Thread Adriano Henrique de Almeida
With cypher you can do:

start a=(10) match a-[:FOLLOW]->b-[:FOLLOW]->a return a

where 10 can be your node Id or you can either use an index.

Cheers.

2011/9/20 iamyuanlong 

> hi all,
>  I have some relation like this:
>
> http://neo4j-community-discussions.438527.n3.nabble.com/file/n3352328/follow.jpg
>
> what should I do to get the users who has been B Followed and has Followed
> back to B.
> In the image the result should be (A).
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-how-to-get-the-User-who-has-been-B-Followed-who-has-Followed-Back-tp3352328p3352328.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError

2011-09-07 Thread Adriano Henrique de Almeida
Hey Nuo,

Good it worked, and yes, enlarging the permgen size was just a palliative
action. In fact, I forgot to check which version you were running (shame on
me).

But as I said, good to know that now it works smoothly.

Cheers

Adriano Almeida
@adrianoalmeida7 <http://twitter.com/adrianoalmeida7>

2011/9/7 Peter Neubauer 

> Nice,
> glad to see it worked 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 Wed, Sep 7, 2011 at 8:12 PM, Nuo Yan  wrote:
>
> >
> > According to this: http://neo4j.org/forums/#nabble-td3248377, I upgraded
> > to 1.4.1 and the problem goes away.
> >
> > I guess there must be a bug in the 1.4.0 REST API that leaks classloader
> > memory or so, and GC didn't happen as expected in PermGen. Anyways, it
> looks
> > great after upgrading to 1.4.1. Memory monitoring graph shows GC happens
> as
> > desired in PermGen.
> >
> > Thank you!
> >
> > On Sep 6, 2011, at 11:30 PM, Nuo Yan wrote:
> >
> > > Hey Adriano and everyone,
> > >
> > > I finally got a chance to monitor/profile the neo4j process with
> VisualVM
> > when I run my set of tests.
> > >
> > > It seems that after running the set of tests once, ~ 50M of PermGen was
> > used. However, subsequent test runs simply multiples that, which worries
> me
> > a little. After the fourth run of the tests, ~ 200M of PermGen space was
> > used.
> > >
> > > My app accesses to neo4j completely using the REST interface. During
> the
> > test run, new nodes and relationships are  being frequently created.
> There
> > are batch requests that performs multiple actions at once (number of
> actions
> > is reasonable, really small in this case, usually a few, or tenth). There
> > are also gremlin script executions through REST (send the gremlin query
> over
> > to the server through REST API). Most of the gremlin queries are
> traversals
> > and returns the vertices or edges match the constraints.
> > >
> > > Total number of nodes created during a test run is only hundreds. There
> > are more relationships, but at most thousands.
> > >
> > > That's basically all of the things that are done against neo4j server
> > during a test run. Given this, do you think the PermGen usage is
> reasonable?
> > Or do you think something is very wrong? I worried that setting a larger
> > PermGen would only postpone but not resolve the OutOfMemory problem.
> > >
> > > Let me know if any other info is needed.
> > >
> > > Thanks much,
> > > Nuo
> > >
> > >
> > >
> > >
> > > On Aug 29, 2011, at 6:09 AM, Adriano Henrique de Almeida wrote:
> > >
> > >> Hi Nuo, any results here?
> > >>
> > >> Cheers
> > >>
> > >> 2011/8/26 Nuo Yan 
> > >>
> > >>> Hey Adriano,
> > >>>
> > >>> Thanks very much for your reply. I will try with MaxPermSize.
> > >>>
> > >>> It's on my local machine, we are evaluating Neo4j and do not have it
> on
> > >>> production yet. I'm accessing the server through the REST APIs, the
> app
> > is
> > >>> separate from Neo. I will see if I can do some profiling on Neo when
> I
> > run
> > >>> my tests.
> > >>>
> > >>> Thanks,
> > >>> Nuo
> > >>>
> > >>>
> > >>>
> > >>> On Fri, Aug 26, 2011 at 3:53 PM, Adriano Henrique de Almeida <
> > >>> adrianoalmei...@gmail.com> wrote:
> > >>>
> > >>>> Hey Nuo,
> > >>>>
> > >>>> wrapper.java.maxmemory and Xmx won't help, since it is a
> PermGenSpace
> > >>>> problem, and they only deal with HeapSpace. Did you try with:
> > >>>> -XX:*MaxPermSize
> > >>>> **?*
> > >>>>
> > >>>> Anyway, something very wrong is happening, since you have few nodes.
> > >>>>
> > >>>> It is happening only on production, or development also?

Re: [Neo4j] Unable to being transaction

2011-09-06 Thread Adriano Henrique de Almeida
Hi Dima,

and regarding your second message, the NotFoundException for the phone
property, what happens is that, on the beginning you had some nodes without
the phone property, and some time after, nodes were created with this phone
property, and that's a good thing, each node can have it's own properties,
so you can evolve your domain easily.

However, in order to grab the property you want, which may not exist on
every node, just use the overloaded getProperty(String key, Object
defaultValue) on the Node.

Like:

String phone = node.getProperty("phone", "");

Regards,

Adriano Almeida

2011/9/6 Jacob Hansson 

> Like Bryce mentions, this is due to a problem the transaction manager has
> encountered, there should be an exception from it sometime before these
> stack traces show up.
>
> If you are able to, look further back in your logs for output from
> org.neo4j.kernel.impl.transaction.TxManager, there should be a stack trace
> with more in-depth information there.
>
> Also, you may want to try upgrading to 1.4.1, which is essentially the same
> version as 1.4, but with several important fixes, as well as improved
> logging from the transaction manager in case of problems like this.
>
> /Jake
>
> On Tue, Sep 6, 2011 at 7:20 AM, Bryce  wrote:
>
> > Hi Dima,
> >
> > I have actually had what I think is the same issue a few times.  I
> haven't
> > figured out exactly what the issue is yet but this is where I got to.
> >
> > Basically I somehow got:
> > "Unable to rollback transaction. Some resources may be commited others
> not.
> > Neo4j kernel should be SHUTDOWN for resource maintance and transaction
> > recovery >"
> >
> > Then:
> > org.neo4j.graphdb.TransactionFailureException: Unable to commit
> transaction
> > Caused by: javax.transaction.HeuristicMixedException: Unable to rollback
> > ---> error code in commit: -1 ---> error code for rollback: 0
> >
> > At which point the TxManager is set to not ok and will not hand out
> another
> > transaction.  Since I haven't figured out whats causing this I proxy all
> > calls for beginTx through some of my own code that watches for this and
> > shuts down and starts the database.  This is obviously not ideal,
> > especially
> > since it causes a database consistency check to occur and stops all
> > database
> > related work for the time that takes.
> >
> > When I was getting this I was running on 1.2 though and decided to
> upgrade
> > (1.4.1) and see if I still get the issue before raising it.  Haven't seen
> > it
> > since, but have only been running a few days.
> >
> > Cheers
> > Bryce
> >
> > On Fri, Sep 2, 2011 at 8:17 PM, Dima Gutzeit <
> dima.gutz...@mailvision.com
> > >wrote:
> >
> > > Any thoughts on the matter ?
> > >
> > > It scares me that the database can stop processing requests like that,
> > > unless I am doing something very illegal and wrong.
> > >
> > > Thanks in advance.
> > >
> > > Regards,
> > > Dima Gutzeit.
> > >
> > >
> > >
> > >
> > > On Thu, Sep 1, 2011 at 9:09 PM, Dima Gutzeit <
> > dima.gutz...@mailvision.com
> > > >wrote:
> > >
> > > > Here is the story. I had some problem with my index, some
> > inconsistency,
> > > > which cause lots of those:
> > > >
> > > > org.neo4j.graphdb.NotFoundException: phone property not found for
> > > > NodeImpl#115.
> > > > at
> > > >
> > >
> >
> org.neo4j.kernel.impl.core.Primitive.newPropertyNotFoundException(Primitive.java:172)
> > > > ~[neo4j-kernel-1.4.jar:1.4]
> > > > at
> > > > org.neo4j.kernel.impl.core.Primitive.getProperty(Primitive.java:167)
> > > > ~[neo4j-kernel-1.4.jar:1.4]
> > > > at
> > > > org.neo4j.kernel.impl.core.NodeProxy.getProperty(NodeProxy.java:145)
> > > > ~[neo4j-kernel-1.4.jar:1.4]
> > > > at
> > > >
> > >
> >
> com.foo.module.graph.actors.BaseGraphServiceActor.nodeTo(BaseGraphServiceActor.java:89)
> > > > ~[module-neo4j-1.0-SNAPSHOT.jar:na]
> > > > at
> > > >
> > >
> >
> com.foo.module.graph.actors.NodeManagerActor.updates(NodeManagerActor.java:118)
> > > > ~[module-neo4j-1.0-SNAPSHOT.jar:na]
> > > > at
> > > com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$
> > > > 1315857921056.aw
> > >
> >
> $original$_AW_$updates$_AW_$com_foo_module_graph_actors_NodeManager$$ProxiedByAWDelegation$$1315857921056(Unknown
> > > > Source) [aspectwerkz-2.2.3.jar:na]
> > > > at
> > > >
> > >
> >
> com.foo.module.graph.actors.NodeManager$$ProxiedByAWDelegation$$1315857921056_1_
> > > > 2012754604_1561793389___AW_JoinPoint.proceed(Unknown Source)
> > > > [aspectwerkz-2.2.3.jar:na]
> > > > at
> > > >
> > >
> >
> akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1$$anonfun$apply$2.apply(TypedActor.scala:227)
> > > > [akka-typed-actor-1.2-RC5.jar:na]
> > > > at
> > scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
> > > > [scala-library-2.9.0-1.jar:na]
> > > > at
> > > >
> > >
> >
> akka.actor.TypedActor$$anonfun$receive$1$$anonfun$apply$1.apply(TypedActor.scala:216)
> > > > [akka

Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError

2011-08-29 Thread Adriano Henrique de Almeida
Hi Nuo, any results here?

Cheers

2011/8/26 Nuo Yan 

> Hey Adriano,
>
> Thanks very much for your reply. I will try with MaxPermSize.
>
> It's on my local machine, we are evaluating Neo4j and do not have it on
> production yet. I'm accessing the server through the REST APIs, the app is
> separate from Neo. I will see if I can do some profiling on Neo when I run
> my tests.
>
> Thanks,
> Nuo
>
>
>
> On Fri, Aug 26, 2011 at 3:53 PM, Adriano Henrique de Almeida <
> adrianoalmei...@gmail.com> wrote:
>
> > Hey Nuo,
> >
> > wrapper.java.maxmemory and Xmx won't help, since it is a PermGenSpace
> > problem, and they only deal with HeapSpace. Did you try with:
> > -XX:*MaxPermSize
> > **?*
> >
> > Anyway, something very wrong is happening, since you have few nodes.
> >
> > It is happening only on production, or development also? If it is
> happening
> > on development, try to isolate the situation where you're stucking the
> > permgen. Run you app with VisualVM, for instance, or any other profiler.
> > Aren't you dealing with classloaders on your app?
> >
> > Cheers
> >
> > Adriano Almeida
> >
> >
> >
> > 2011/8/26 Jim Webber 
> >
> > > Hi Nuo,
> > >
> > > if you're using Neo4j server then you can edit the value in
> > > conf/neo-wrapper.conf
> > >
> > > wrapper.java.maxmemory=1024
> > >
> > > Jim
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> >
> >
> >
> > --
> > Adriano Almeida
> > Caelum | Ensino e Inovação
> > www.caelum.com.br
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Events Coming Up in September

2011-08-26 Thread Adriano Henrique de Almeida
Hi Allison, just adding,

There will be Jim Webber's talk at QCon São Paulo, in my track, (
http://www.qconsp.com/schedule/sabado), which will be on Saturday, September
10, and the workshop, 1 day before. (which I'll attend).

;)

Cheers,

Adriano Almeida

2011/8/26 Allison Sparrow 

> ***
> Hi Everyone,
>
> We have a bunch of great events coming up in September. Check it out below.
>
> We are adding more events on the regular, so be sure to check back at
> http://plancast.com/neo4j for updates throughout the month. If you have
> any
> questions regarding participation, feel free to email me at
> alli...@neotechnology.com.
>
>
> *WEBINAR: Getting Started with Neo4j*
> Thursday, 1 September @10:00 PDT
>
> Neo4j is the world's leading graph database, storing data in the nodes
> and relationships of a graph. The most generic of data structures, a
> graph elegantly represents any kind of data, preserving the natural
> structure of the domain.
>
> This webinar is designed to help developers achieve a fast start with
> Neo4j.. There are no pre-requisites. Join this webinar to learn:
>
> * basic graph concepts
> * modeling data in a graph
> * querying a graph
>
> Register:  https://www1.gotomeeting.com/register/491756720
>
> System Requirements
>
> PC-based attendees
> Required: Windows® 7, Vista, XP or 2003 Server
> Macintosh®-based attendees
> Required: Mac OS® X 10.5 or newer
>
>
> *LONDON Keynote: Ian Robinson presents @Progressive .NET Tutorials*
> Wednesday, 7 September @ 09:30 - 13:20 GMT
>
> This hands-on tutorial will introduce you to building RESTful web services
> using the new Microsoft Web APIs (http://wcf.codeplex.com). Over the
> course
> of several exercises, we'll develop a simple Fighting Fantasy service for
> machines to play when they're not busy running your business applications.
> The tutorial's mixture of theory and practice will cover:
> - Resource design and development
> - Test-driven server- and client-side development
> - The Atom Syndication Format
> - Caching
> - Hypermedia
>
>
> http://skillsmatter.com/podcast/open-source-dot-net/restful-web-service-development-in-dot-net
>
> *BAY AREA Meetup: Spring Data & Neo4j*
> Wednesday, 7 September @ 19:00 PDT
>
> Join us for an introduction to Spring Data, with a special emphasis on
> Spring Data Neo4j. We'll get you started with this exciting new technology,
> then take a deeper dive into how you can make the magic happen with Neo4j.
>
> www.meetup.com/graphdb/events/30126321/
>
> *WEBINAR: Getting Started with Spring Data Graph*
> Thursday, 8 September @ 10:00-11:00 PDT
>
> The Spring Data project makes it easier to build Spring-powered
> applications
> that use new data access technologies such as non-relational NOSQL
> databases, cloud based data services, and graph databases.
>
> This webinar is designed for enterprise developers who are working with
> Spring and need to understand if they can benefit from a graph database.
> The
> session will introduce the different types of data management offered in
> Spring Data, including graph databases, and will show how easy it is to get
> started with the Spring Data Graph project.
>
> https://www1.gotomeeting.com/register/622766136
>
> *KARLSKRONA (SWEDEN) Conference Talk: How Graph Databases Can Make You a
> Superstar @Devcon 2011 *
> Thursday, 15 September
>
>  Andres will be
> presenting
> about graph databases generally, and Neo4j specifically.
>
> telecomcity.org/hem/devcon11.aspx
>
> *SEATTLE Meetup: Neo4j in the Real World
> *Thursday, 15 September @ 19:00 PDT
>
> An evening learning about real world use cases for a graph database, citing
> a mix of actual and abstracted commercial deployments. We'll consider
> modeling a real domain, performance tuning, and deploying a local or
> geographically distributed cluster.
>
> www.meetup.com/graphdb-seattle/events/27968441/?rv=ea1.2
>
> *DENVER Conference Talk: Geoprocessing with Neo4j Spatial and OSM @FOSS4G *
> Friday, 16 September @ 14:00 MST
>
> Presentation by Craig Taverner, Amanzi. What better way to perform
> geoprocessing than on a graph! And what better dataset to play with than
> Open Street Map!
>
> 2011.foss4g.org/sessions/geoprocessing-neo4j-spatial-and-osm
>
> *ST. LOUIS Conference Talk: An Introduction to Doctor Who (and Neo4j)
> @Strange Loop 2011
> *Monday, 19 September
>
> Doctor Who is the world’s longest running science-fiction TV series.
> Battling daleks, cybermen and sontarans, and always accompanied by his
> trusted human companions, the last Timelord has saved earth from
> destruction
> more times than you’ve cursed Maven.
>
> Neo4j is the world’s leading open source graph database. Designed to
> interrogate densely connected data with lightning speed, it lets you
> traverse millions of nodes in a fraction of the time it takes to run a
> multi-join SQL query.
>
> When these two meet, the result is an entertaining introduction to the

Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError

2011-08-26 Thread Adriano Henrique de Almeida
Hey Nuo,

wrapper.java.maxmemory and Xmx won't help, since it is a PermGenSpace
problem, and they only deal with HeapSpace. Did you try with: -XX:*MaxPermSize
**?*

Anyway, something very wrong is happening, since you have few nodes.

It is happening only on production, or development also? If it is happening
on development, try to isolate the situation where you're stucking the
permgen. Run you app with VisualVM, for instance, or any other profiler.
Aren't you dealing with classloaders on your app?

Cheers

Adriano Almeida



2011/8/26 Jim Webber 

> Hi Nuo,
>
> if you're using Neo4j server then you can edit the value in
> conf/neo-wrapper.conf
>
> wrapper.java.maxmemory=1024
>
> Jim
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] how setup lucene fulltext search filter

2011-07-12 Thread Adriano Henrique de Almeida
Hi Edgar,

If I correctly understood your question, all you need to do is call the
query() method on the fulltextIndex object you've got.

The second argument you'll need to pass will be what you're looking for, and
there you can use Lucene query syntax to set up your query. You can take a
look at Lucene's docs, so you can see all the possibilities you got:
http://lucene.apache.org/java/3_0_1/queryparsersyntax.html.

So, to search for something you may have:

IndexHits nodes = fulltextIndex.query("indexName", "your query with
lucene's syntax goes here");

See if this is what you need.

regards

2011/7/12 刘运杰 

> Adriano,thank you for your response.I do run up FullText Search,and notice
> the Configuration for Lucene in Neo4j,that is  "any other configuration is
> passed onto the backend index (e.g. Lucene) to interpret".and then I set  my
>  Analyser for FullText Search, like below :
> Index fulltextIndex = index.forNodes( INDEX_ENGINE,
> MapUtil.stringMap( IndexManager.PROVIDER, "lucene",
> "analyzer","org.apache.lucene.analysis.cn.ChineseAnalyzer","type",
> "fulltext" ) );
>
>
> but now I need filter FullText Search result, that mean I should set filter
> for lucene,I wonder how to pass filter setting to lucene from Neo4j. And how
> search in search result,Thanks.
>
>
> Edgar.
> At 2011-07-12 21:56:50,"Adriano Henrique de Almeida" <
> adrianoalmei...@gmail.com> wrote:
>
> >Hi Edgard,
> >
> >sure you can do a FullText Search on your data with Lucene and Neo4j. Did
> >you take a look here
> >http://docs.neo4j.org/chunked/1.4/indexing-create-advanced.html
> >
> >If you need any other help, just let us know.
> >
> >Regards.
> >
> >2011/7/12 刘运杰 
> >
> >> I  like to filter fulltext search result,but don't kown where to set
> lucene
> >> search filter.
> >>
> >>
> >> I notice  file LuceneIndex.java ,
> >>  line 355,
> >> Hits hits = new Hits( searcher, query, null, sorting, forceScore );
> >> line 370,
> >> Hits hits = new Hits( additionsSearcher, query, null );
> >>
> >>
> >> all pass null for filter.
> >>
> >>
> >> So Neo4j disable lucene search filter?
> >> how setup lucene fulltext search filter?
> >>
> >>
> >> Thanks in advance.
> >>
> >>
> >> Edgar,
> >> ___
> >> Neo4j mailing list
> >> User@lists.neo4j.org
> >> https://lists.neo4j.org/mailman/listinfo/user
> >>
> >
> >
> >
> >--
> >Adriano Almeida
> >Caelum | Ensino e Inovação
> >www.caelum.com.br
> >___
> >Neo4j mailing list
> >User@lists.neo4j.org
> >https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] how setup lucene fulltext search filter

2011-07-12 Thread Adriano Henrique de Almeida
Hi Edgard,

sure you can do a FullText Search on your data with Lucene and Neo4j. Did
you take a look here
http://docs.neo4j.org/chunked/1.4/indexing-create-advanced.html

If you need any other help, just let us know.

Regards.

2011/7/12 刘运杰 

> I  like to filter fulltext search result,but don't kown where to set lucene
> search filter.
>
>
> I notice  file LuceneIndex.java ,
>  line 355,
> Hits hits = new Hits( searcher, query, null, sorting, forceScore );
> line 370,
> Hits hits = new Hits( additionsSearcher, query, null );
>
>
> all pass null for filter.
>
>
> So Neo4j disable lucene search filter?
> how setup lucene fulltext search filter?
>
>
> Thanks in advance.
>
>
> Edgar,
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] typo in Expander interface

2011-07-07 Thread Adriano Henrique de Almeida
I've sent a Pull Request long time ago fixing this, but it was to the old
neo4j repository. Guess it wasn't merged.

https://github.com/neo4j/graphdb/pull/2

Can send it again, if the guys want.

2011/7/7 Niels Hoogeveen 

>
> The interface of org.neo4j.graphdb.Expander contains a typo.
> The method addRelationsipFilter(Predicate) should be
> called addRelationshipFilter(Predicate).
> Niels
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Unable to upgrade neostore

2011-07-05 Thread Adriano Henrique de Almeida
Paul,

Did you try to upgrade to 1.2, then to 1.3 and then to 1.4 before going from
the 1.1 straight to the 1.4?

Regards

2011/7/5 Paul A. Jackson 

> I have a neo4j 1.1 graph that I tried opening with 1.4M5. I had a
> configuration that contained allow_store_upgrade=true:
> [15] = {java.util.HashMap$Entry@12374} allow_store_upgrade -> true
>   key: java.lang.String = {java.lang.String@12376}"allow_store_upgrade"
>   value: java.lang.String = {java.lang.String@12380}"true"
>
> And I get this exception:
> jvm 1| Caused by: org.neo4j.graphdb.TransactionFailureException: Could
> not create data source [nioneodb], see nested
> exception for cause of error
> jvm 1|  at
> org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:153)
> jvm 1|  at
> org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:111)
> jvm 1|  at
> org.neo4j.kernel.EmbeddedGraphDbImpl.(EmbeddedGraphDbImpl.java:189)
> jvm 1|  at
> org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:79)
> jvm 1|  at
> com.g1.dcg.graph.neo4j.NeoGraph.(NeoGraph.java:118)
> jvm 1|  ... 12 more
> jvm 1| Caused by:
> org.neo4j.kernel.impl.nioneo.store.IllegalStoreVersionException: Store
> version [NeoStore v0.9.5].
> Please make sure you are not running old Neo4j kernel on a store that has
> been created by newer version of Neo4j.
> jvm 1|  at
> org.neo4j.kernel.impl.nioneo.store.NeoStore.versionFound(NeoStore.java:431)
> jvm 1|  at
> org.neo4j.kernel.impl.nioneo.store.AbstractStore.loadStorage(AbstractStore.java:147)
> jvm 1|  at
> org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.(CommonAbstractStore.java:170)
> jvm 1|  at
> org.neo4j.kernel.impl.nioneo.store.AbstractStore.(AbstractStore.java:120)
> jvm 1|  at
> org.neo4j.kernel.impl.nioneo.store.NeoStore.(NeoStore.java:65)
> jvm 1|  at
> org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.(NeoStoreXaDataSource.java:132)
> jvm 1|  at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> jvm 1|  at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> jvm 1|  at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> jvm 1|  at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> jvm 1|  at
> org.neo4j.kernel.impl.transaction.XaDataSourceManager.create(XaDataSourceManager.java:75)
> jvm 1|  at
> org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:147)
> jvm 1|  ... 16 more
>
> My main question is whether this is supported or I am doing something
> wrong. I don't really need to support the upgrade of version 1.1 databases,
> but I want to make sure my code is correct so that I will be able to support
> upgrades in the future.
>
> Thanks.
>
> Paul Jackson
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] checked exception using Cypher with Java

2011-07-04 Thread Adriano Henrique de Almeida
Very good Andres,

Congratulations for the great work.

Cheers

2011/7/4 Andres Taylor 

> Obrigado Adriano!
>
> You are, of course, correct. My JVM inexperience shows...
>
> I think I've made the
> changes<
> https://github.com/neo4j/community/commit/e4622cbbcad8210babb01d861a5ef9df823c054b
> >you
> suggested.
>
> Thanks for your help!
>
> Andrés
>
> On Mon, Jul 4, 2011 at 4:35 PM, Adriano Henrique de Almeida <
> adrianoalmei...@gmail.com> wrote:
>
> > Hi,
> >
> > I've been doing some stuffs with the Cypher API on M4 and found a couple
> > strange issues at the API, that I'd like to discuss.
> >
> > - CypherParser.parse("") method throws SyntaxError, which is a checked
> > exception. 2 issues here.
> >
> >
> > a) a checked exception called Error, seems weird and going against
> > conventions. The name suggests it is an Error, thus, not recoverable.
> >
> > b) I don't know about you guys, but I think that a SyntaxError should be
> > unchecked, I don't see it as recoverable. Take Hibernate API for
> instance,
> > if you write an invalid HQL, you'll get the exception, but without the
> > extra
> > work of having to handle the exception that should not be handled, the
> > query
> > should be fixed. Or maybe there is a scenario for it to be checked, but
> I'm
> > not aware of, I think the default scenario would be to not handle the
> > exception. And BTW, of course, I could just wrap it inside an unchecked
> > exception in my code.
> >
> >
> > Cheers,
> >
> > --
> > Adriano Almeida
> > Caelum | Ensino e Inovação
> > www.caelum.com.br
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] checked exception using Cypher with Java

2011-07-04 Thread Adriano Henrique de Almeida
Hi,

I've been doing some stuffs with the Cypher API on M4 and found a couple
strange issues at the API, that I'd like to discuss.

- CypherParser.parse("") method throws SyntaxError, which is a checked
exception. 2 issues here.


a) a checked exception called Error, seems weird and going against
conventions. The name suggests it is an Error, thus, not recoverable.

b) I don't know about you guys, but I think that a SyntaxError should be
unchecked, I don't see it as recoverable. Take Hibernate API for instance,
if you write an invalid HQL, you'll get the exception, but without the extra
work of having to handle the exception that should not be handled, the query
should be fixed. Or maybe there is a scenario for it to be checked, but I'm
not aware of, I think the default scenario would be to not handle the
exception. And BTW, of course, I could just wrap it inside an unchecked
exception in my code.


Cheers,

-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Embedded with webadmin

2011-05-27 Thread Adriano Henrique de Almeida
Hi Jake,

Coincidently I was checking your commit yesterday. I have no restrictions
trying fresh (and perhaps not bug free and stable features), but yeah, I
know some might have. I'll also give it a try this afternoon and post my
impressions here. Nice work Jake.

Regards,

Adriano

2011/5/27 Jacob Hansson 

> Adriano: The fact that this code is not QA'd and isn't "officially" in the
> M03 release will mean that we do not guarantee the API won't change, and
> that there may be undiscovered problems with it.
>
> That said, if you want to use it, take a look at:
>
> https://github.com/neo4j/community/blob/master/server/src/main/java/org/neo4j/server/WrappingNeoServerBootstrapper.java
>
> Which should be available in the M03 release due later today.
>
> /Jake
>
> On Fri, May 27, 2011 at 9:55 AM, Jim Webber  wrote:
>
> > If you use it in the M03 release, you're on your own :-)
> >
> > Jim
> >
> > On 27 May 2011, at 00:04, Adriano Henrique de Almeida wrote:
> >
> > > Wow... very good to know that the code exists!
> > >
> > > 2011/5/26 Jim Webber 
> > >
> > >> This code exists, but isn't yet QA'd or documented.
> > >>
> > >> It will appear in the M03 release, but won't be QA'd and documented
> > until
> > >> the M04 release.
> > >>
> > >> Jim
> > >>
> > >> On 26 May 2011, at 18:51, Peter Neubauer wrote:
> > >>
> > >>> Yeah.
> > >>> just saw today some really cool stuff from Jacob in this direction.
> > Stay
> > >>> tuned - it's lab day tomorrow :)
> > >>>
> > >>> 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 Wed, May 25, 2011 at 9:32 AM, Craig Taverner 
> > >> wrote:
> > >>>
> > >>>> While HA is one option, with two processes 'sharing' a database, one
> > >> being
> > >>>> the server and the other the embedded app, there is another option,
> > and
> > >>>> that
> > >>>> is to integrate the two apps. If your app is a web-app and also
> needs
> > to
> > >>>> exist in something like jetty or winstone, perhaps you could run
> both
> > >> the
> > >>>> server and your app together in the same process? One obvious way of
> > >> doing
> > >>>> this is to write your app as a server extension within the
> > neo4j-server
> > >>>> extensions API. I suspect there are other ways to do this where your
> > app
> > >> is
> > >>>> in control and simply accesses (and starts) the relevant code from
> > >>>> neo4j-server, but I don't know how to do that. Could be interesting
> to
> > >> find
> > >>>> out.
> > >>>>
> > >>>> On Tue, May 24, 2011 at 11:39 PM, Adriano Henrique de Almeida <
> > >>>> adrianoalmei...@gmail.com> wrote:
> > >>>>
> > >>>>> Yep,
> > >>>>>
> > >>>>> the neo4jserver is just a rest api over neo4j database, so it's
> still
> > >>>>> stored
> > >>>>> in at the disk. So, all you need to do, is to point your java
> > >> application
> > >>>>> to
> > >>>>> the neo4j db directory.
> > >>>>>
> > >>>>> Remember, that you'll be unable to start both you app and the neo4j
> > >>>> server
> > >>>>> at the same time, at the same database. For this situation, you'll
> > need
> > >>>>> Neo4j HA.
> > >>>>>
> > >>>>> Regards
> > >>>>>
> > >>>>> 2011/5/24 Chris Bara

Re: [Neo4j] Embedded with webadmin

2011-05-26 Thread Adriano Henrique de Almeida
Wow... very good to know that the code exists!

2011/5/26 Jim Webber 

> This code exists, but isn't yet QA'd or documented.
>
> It will appear in the M03 release, but won't be QA'd and documented until
> the M04 release.
>
> Jim
>
> On 26 May 2011, at 18:51, Peter Neubauer wrote:
>
> > Yeah.
> > just saw today some really cool stuff from Jacob in this direction. Stay
> > tuned - it's lab day tomorrow :)
> >
> > 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 Wed, May 25, 2011 at 9:32 AM, Craig Taverner 
> wrote:
> >
> >> While HA is one option, with two processes 'sharing' a database, one
> being
> >> the server and the other the embedded app, there is another option, and
> >> that
> >> is to integrate the two apps. If your app is a web-app and also needs to
> >> exist in something like jetty or winstone, perhaps you could run both
> the
> >> server and your app together in the same process? One obvious way of
> doing
> >> this is to write your app as a server extension within the neo4j-server
> >> extensions API. I suspect there are other ways to do this where your app
> is
> >> in control and simply accesses (and starts) the relevant code from
> >> neo4j-server, but I don't know how to do that. Could be interesting to
> find
> >> out.
> >>
> >> On Tue, May 24, 2011 at 11:39 PM, Adriano Henrique de Almeida <
> >> adrianoalmei...@gmail.com> wrote:
> >>
> >>> Yep,
> >>>
> >>> the neo4jserver is just a rest api over neo4j database, so it's still
> >>> stored
> >>> in at the disk. So, all you need to do, is to point your java
> application
> >>> to
> >>> the neo4j db directory.
> >>>
> >>> Remember, that you'll be unable to start both you app and the neo4j
> >> server
> >>> at the same time, at the same database. For this situation, you'll need
> >>> Neo4j HA.
> >>>
> >>> Regards
> >>>
> >>> 2011/5/24 Chris Baranowski 
> >>>
> >>>> Hi all,
> >>>>
> >>>> I searched this mailing list some but couldn't find a definitive
> >> answer:
> >>>> is it possible to use the web admin with an embedded neo4j database?
> >> I'd
> >>>> like to run embedded in my project and also be able to administrate
> >>> online.
> >>>>
> >>>> Thanks!
> >>>> Chris
> >>>> ___
> >>>> Neo4j mailing list
> >>>> User@lists.neo4j.org
> >>>> https://lists.neo4j.org/mailman/listinfo/user
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Adriano Almeida
> >>> Caelum | Ensino e Inovação
> >>> www.caelum.com.br
> >>> ___
> >>> Neo4j mailing list
> >>> User@lists.neo4j.org
> >>> https://lists.neo4j.org/mailman/listinfo/user
> >>>
> >> ___
> >> Neo4j mailing list
> >> User@lists.neo4j.org
> >> https://lists.neo4j.org/mailman/listinfo/user
> >>
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Embedded with webadmin

2011-05-24 Thread Adriano Henrique de Almeida
Yep,

the neo4jserver is just a rest api over neo4j database, so it's still stored
in at the disk. So, all you need to do, is to point your java application to
the neo4j db directory.

Remember, that you'll be unable to start both you app and the neo4j server
at the same time, at the same database. For this situation, you'll need
Neo4j HA.

Regards

2011/5/24 Chris Baranowski 

> Hi all,
>
> I searched this mailing list some but couldn't find a definitive answer:
> is it possible to use the web admin with an embedded neo4j database? I'd
> like to run embedded in my project and also be able to administrate online.
>
> Thanks!
> Chris
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Color suggestions for the Self-Relationship bike shed

2011-05-16 Thread Adriano Henrique de Almeida
I agree with Marko.

In fact, I'd say that if you can choose more than one option, I'd go with
option 1 and 2. The option one when you're not sure you're creating a loop
(not sure if the end node will be the start node), so in order to avoid ifs
on the client code, option 1 will go for it. If you're sure, and the
operation is explicitly a loop, use the 2nd option.

Regards

2011/5/16 Marko Rodriguez 

> Hi,
>
> I say option 1.
>
> Marko.
>
> On May 16, 2011 8:12 AM, "Tobias Ivarsson" <
> tobias.ivars...@neotechnology.com> wrote:
>
> There has been a few discussions around supporting Loops, relationships
> with
> the same start node as end node, recently. Both here on the mailing list,
> and even more at the Neo Technology office.
>
> We have a working patch for handling loops in Neo4j, but one final piece is
> missing: what should the API look like for creating a loop? There are three
> suggestions for this, I'll list them with the pros and cons we've found for
> each. It would be great if you could provide some feedback on what you
> think
> on the matter, and which alternative you prefer.
>
> The alternatives:
>
> 1. let the existing createRelationshipTo(Node,RelationshipType) create
> loops
> if the same node is passed as argument.
> 2. add a new createLoop(RelationshipType) method for creating loops.
> 3. add a createRelationshipOrLoop(Node,RelationshipType) method that would
> work like createRelationshipTo, except it would permit creating loops.
>
>
> The pros and cons:
>
> PRO 1: does not add a new method to the API that developers have to learn.
>
> CON 1: changes the semantics of the createRelationshipTo method slightly
> from what it is today.
>
> CON 1: will not help you catch programming errors where you've mistakenly
> written code that creates a relationship to the same node (most of the
> cases
> where code creates relationships to the wrong node it is to the same node).
>
> PRO 2: will let you be explicit of when creating a loop.
>
> PRO 2: will let createRelationshipTo preserve the semantics it has today.
> Which will help catching many create relationships to the wrong node cases.
>
> CON 2: will force you to be explicit about loops, most applications that
> wan't loops will just treat them as any relationship where the start node
> and end node will just happen to be the same.
>
> PRO 3: adds loops as a generic construct (start and end just happens to be
> the same) without changing the current semantics of createRelationshipTo
>
> CON 3: Introduces a new method that creates relationships between any two
> nodes.
>
>
> It would of course be possible to go with both 2 and 3, and I think option
> 3
> makes more sense as an addition to option 2, rather than as an alternative
> to it.
>
> What do you think?
> --
> Tobias Ivarsson 
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Getting started with Ruby

2011-05-11 Thread Adriano Henrique de Almeida
I'll put some cons, but the pros are just the opposite for the other.

- Well, one con that comes to my mind regarding the use of the embedded API
that you're attached to JRuby and maybe you want/have to use plain MRI,
Rubinius or something else.

- One con that I can think on the REST API is network latency, which may
become a performance bottleneck.

I think that both configurations are simple. However I prefer using the
embedded API, just cos I really enjoy the way the embedded API is designed.

Regards

2011/5/11 Evan Haveman 

> Can someone outline the pros and cons of using Neo4J's embedded API vs its
> REST API given Ruby as the preferred language.
>
> One pro of the embedded API is I believe it is more complete than the REST
> API -- what is the REST API missing?
>
> One pro of the REST API is that my configuration is much simpler.
>
> Any others?
>
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Regd: Neo4j basic questions.

2011-05-02 Thread Adriano Henrique de Almeida
Hi Anil,

if you're also interested, there is the IMDB example:
https://github.com/neo4j-examples/imdb. Also I have an example project at my
github: https://github.com/adrianoalmeida7/neo4j-vraptor-example where I
integrate Neo4j with a webframework other than SpringMVC (in this case,
VRaptor). I also break some of the design guidelines suggested by the docs,
so my models are decoupled from the Neo4J API.

It lacks some functionality and UI improvement, but the majority of the
graph traversals are there. Hope it can be helpful to you.

Regards

Adriano

2011/5/2 Anil Tatikonda 

> This is really very interesting... thanks a lot i will keep trying
> different
> things out
>
> On Mon, May 2, 2011 at 1:15 PM, Michael Hunger <
> michael.hun...@neotechnology.com> wrote:
>
> > Please don't confuse a graph data structure with a "visual" graphical
> > representation, graphical can mean anything.
> >
> > Graphs are nodes and relationships to other nodes which all can have
> > relationships.
> >
> > For you as a Java developer it is perhaps easiest to imagine those as
> > object networks.
> >
> > Otherwise it is as with every other Database, you have a physical
> database
> > and an API, you create your data as you do
> > with any other technology, by inserting things (and in a graph
> additionally
> > by relating things).
> >
> > Perhaps one or more of the presentations about graph databases is useful
> > for you.
> >
> > http://www.slideshare.net/tag/neo4j
> >
> >
> http://www.slideshare.net/emileifrem/an-intro-to-neo4j-and-some-use-cases-jfokus-2011
> >
> http://www.slideshare.net/peterneubauer/gdm-2011-neo4j-and-real-world-apps
> > http://www.springsource.com/downloads/getting-started-spring-data-graph
> >
> > Cheers
> >
> > Michael
> >
> > You might also look into the documentation of our Spring Integration
> > Library (Spring Data Graph) - http://bit.ly/sdg-book
> >
> >
> > Am 02.05.2011 um 19:07 schrieb Anil Tatikonda:
> >
> > > Thanks a lot for all the Help.
> > >
> > > Yes I'm a Java Developer i may sound so dumb to you.  I was just trying
> > to
> > > validate my understanding as this is little interesting for me and its
> > > giving me little different perspective towards the data staying in a
> file
> > > locally... its very different from our day to day style of doing stuff.
> > >
> > > Anyways thanks for the help.
> > >
> > > On Mon, May 2, 2011 at 12:58 PM, Marko Rodriguez  > >wrote:
> > >
> > >> Hey,
> > >>
> > >> Are you a Java developer? Simply start playing around as such:
> > >>
> > >> GraphDatabaseService graph = new EmbeddedGraphDatabase( "var/graphdb"
> );
> > >> Node a = graph.createNode();
> > >> a.setProperty("name", "marko");
> > >> Node b = graph.createNode()
> > >> b.setProperty("name", "gold plated rocket car");
> > >> Relationship r = a.createRelationshipTo(b,
> > >> DynamicRelationshipType.withName("purchased"));
> > >> r.setProperty("timeStamp", 1234235234);
> > >>
> > >> // Marko--purchased-->GoldPlatedRocketCar
> > >>
> > >> If you want to dynamically do stuff from a terminal, you can consider
> > >> learning about graph databases with Gremlin.
> > >>   http://gremlin.tinkerpop.com
> > >>
> > >> ./gremlin.sh
> > >> g = new Neo4jGraph('var/graphdb');
> > >> a = g.addVertex([name:'marko'])
> > >> b = g.addVertex([name:'gold plated rocket car'])
> > >> r = g.addEdge(a, b, 'purchased', [timeStamp:'1234235234'])
> > >> // what did Marko purchase?
> > >> a.outE('purchased').inV.name
> > >>
> > >>   http://paste.pocoo.org/show/381641/
> > >>
> > >> Gremlin comes packaged with a few example graphs--no customer/order
> > >> data--but hopefully you can abstract the concepts over to your domain.
> > >>
> > >> Hope that helps,
> > >> Marko.
> > >>
> > >> http://markorodriguez.com
> > >>
> > >> On May 2, 2011, at 10:13 AM, Anil Tatikonda wrote:
> > >>
> > >>> Thanks that is a pretty quick reply i appreciate your response that
> > helps
> > >> my
> > >>> understanding.
> > >>>
> > >>> And so now I'm trying the example in the Design Guide section. But it
> > >> asks
> > >>> me to create the RelationShipTypes by following the instructions in
> > >> Getting
> > >>> started but its not that clear.
> > >>> And moreover where do i initialize this data and do you have any
> sample
> > >> data
> > >>> for those Customer and Orders that i can use.
> > >>>
> > >>> GraphDatabaseService graphDb = new EmbeddedGraphDatabase(
> "var/graphdb"
> > >> );
> > >>>
> > >>>
> > >>> On Mon, May 2, 2011 at 12:10 PM, Marko Rodriguez <
> okramma...@gmail.com
> > >>> wrote:
> > >>>
> >  Hello,
> > 
> >  Neo4j is a database + API. Thus, Neo4j will persist your data for
> you
> > >> (in a
> >  directory) and will expose that data logically as a graph for you
> > >> (JavaDoc
> >  API).
> > 
> >  Neo4j is NOT a graph API over an existing database (e.g. MySQL).
> > 
> >  Hope that helps,
> >  Marko.
> > 
> >  http://markorodriguez.com
> > 
> >  On May 2, 2011, at 

Re: [Neo4j] Wiki documentation neo4j+restfulie.

2011-04-26 Thread Adriano Henrique de Almeida
Hi Jim,

We (Adriano and Jose) wrote the Restfulie example and it is already
published on the wiki. Thanks for the attention. It is the basic doc, just
like the rest-client one.

Thanks

2011/4/19 Jim Webber 

> Hi José,
>
> Please feel free to add to the wiki. We've had a problem with spammers
> recently, so if you run into permissions problems please shout.
>
> Jim
>
> On 22 Mar 2011, at 20:19, jdbjun...@gmail.com wrote:
>
> > Hi, going through the neo4j documentation I found some examples of how
> > access neo4j api using two rest libaries (rest-client, neography).
> > After reading it, I've decided to do the same tests using the library
> > restfulie, which I'm committer.
> > Am I allowed to change the wiki adding the restfulie example? If it is
> ok,
> > is any one willing to review it before changing the wiki?
> >
> > Thanks,
> > José Donizetti.
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] a small consideration on the index api

2011-04-03 Thread Adriano Henrique de Almeida
Hi Rick,

that is what I've been doing on my code (in fact, it's a small variation of
what you've suggested). My point and concern is about the API encouraging
people to spread Strings throughout the code.

That's it :).

Regards

2011/4/3 Rick Bullotta 

> Simply create an enum as below, and wherever you use the hardcoded string,
> use MyIndexTypes.places.name().
>
>public static enum MyIndexTypes {
>places,
>people,
>cars,
>nuclearreactors,
>vegetables,
>headsofstate
> }
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On Behalf Of Adriano Henrique de Almeida
> Sent: Saturday, April 02, 2011 10:31 PM
> To: user@lists.neo4j.org
> Subject: [Neo4j] a small consideration on the index api
>
> Hi everyone,
>
> I was playing right now with the index api to do some fulltext search, and
> I
> found something what I think is not good for the API.
>
> The index API rely heavily on Strings, just like the following:
>
>   Index typeIndex = index.forNodes("places");
>
> I do write the call to forNodes method all the time I need to use it, like
> when creating and when searching with this index and sure, probably I could
> do it better, like isolating this on an application scoped component. Thus,
> the "places" String got spread all over my code. And then, guess what, I've
> made a mistake naming my index. I had to hunt down every "places" String on
> my codebase (at this stage it isn't large, but for some other people this
> can be).
>
> My suggestion is to work with something similar at what is done at the
> Relationships, with the RelationshipType interface. I never use Strings
> when
> creating relationships, only enums who implements the interface, and I can
> easily refactor it.
>
> As pointing a problem (at least in my point of view) is good, suggesting a
> solution is better :D. Then, my final suggestion would be to create an
> interface to the index definitions, like IndexDefinition, and do an
> overload
> at the forNodes method, that can receive the definition
> (forNodex(IndexDefinition)). It will only delegate to the forNodes(String)
> method, using the enum, so one can stick with it, if is already using it.
>
> Of course, I don't know if you guys think that being refactor friendly is
> an
> major issue for an API, if not, just ignore me ;).
>
> Best regards.
>
> --
> Adriano Almeida
> Caelum | Ensino e Inovação
> www.caelum.com.br
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] a small consideration on the index api

2011-04-02 Thread Adriano Henrique de Almeida
Hi everyone,

I was playing right now with the index api to do some fulltext search, and I
found something what I think is not good for the API.

The index API rely heavily on Strings, just like the following:

   Index typeIndex = index.forNodes("places");

I do write the call to forNodes method all the time I need to use it, like
when creating and when searching with this index and sure, probably I could
do it better, like isolating this on an application scoped component. Thus,
the "places" String got spread all over my code. And then, guess what, I've
made a mistake naming my index. I had to hunt down every "places" String on
my codebase (at this stage it isn't large, but for some other people this
can be).

My suggestion is to work with something similar at what is done at the
Relationships, with the RelationshipType interface. I never use Strings when
creating relationships, only enums who implements the interface, and I can
easily refactor it.

As pointing a problem (at least in my point of view) is good, suggesting a
solution is better :D. Then, my final suggestion would be to create an
interface to the index definitions, like IndexDefinition, and do an overload
at the forNodes method, that can receive the definition
(forNodex(IndexDefinition)). It will only delegate to the forNodes(String)
method, using the enum, so one can stick with it, if is already using it.

Of course, I don't know if you guys think that being refactor friendly is an
major issue for an API, if not, just ignore me ;).

Best regards.

-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Graph traversal doubt

2011-03-20 Thread Adriano Henrique de Almeida
Hi,

I have the following attached graph where I have persons who traveled to
some cities.

What I want to find out is, for a given city, for instance Toronto, "the
ones who traveled there, also traveled to these other cities" (in the
attached graph are Tokyo (by Adriano) and Paris (by Peter)).

To retrieve this information, I did the following code:

   Collection allNodes = new ArrayList();

Node toronto = db.getNodeById(torontoId); // First I get Toronto node and
its relationships to know who traveled there

Iterable relationships =
toronto.getRelationships(Relationships.TRAVELED_TO, Direction.INCOMING);


for (Relationship relationship : relationships) {

Node[] nodes = relationship.getNodes(); // For each relationship found,
I all nodes that somehow is related to this relationship

for (Node node : nodes) {

Collection citiesNode = node.traverse(Order.DEPTH_FIRST,
StopEvaluator.DEPTH_ONE, ReturnableEvaluator.ALL_BUT_START_NODE,
Relationships.TRAVELED_TO, Direction.OUTGOING).getAllNodes(); // And finally
I traverse the graph to find to find from theses nodes where the other
people traveled to

allNodes.addAll(citiesNode);

}

}

Well, with this I can get the results I wanted, however, it seemed to me
that what I did was too complicated :) . So, my question is: "is there any
way to do this traversal in a more straightforward manner?".

Thanks in advance.

-- 
Adriano Almeida
<>___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user