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 andrewt...@yahoo.com



 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 noppani...@gmail.com
 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: noppanitnoppani...@gmail.com
 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_codenode=438527code=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 fi...@nibewege.org

 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 Haesfi...@nibewege.org
  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 yuanlong1...@gmail.com

 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-08-29 Thread Adriano Henrique de Almeida
Hi Nuo, any results here?

Cheers

2011/8/26 Nuo Yan yan@gmail.com

 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 j...@neotechnology.com
 
   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 alli...@neotechnology.com

 ***
 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

  https://www1.gotomeeting.com/register/889000248Andres 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
 complex history of a complex hero, and a rapid survey of the elegant APIs
 of
 a delightfully simple 

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 刘运杰 yunjie@163.com

 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] 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:

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

See if this is what you need.

regards

2011/7/12 刘运杰 yunjie@163.com

 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 :
 IndexNode 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 刘运杰 yunjie@163.com
 
  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] 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 pd_aficion...@hotmail.com


 The interface of org.neo4j.graphdb.Expander contains a typo.
 The method addRelationsipFilter(Predicate? super Relationship) should be
 called addRelationshipFilter(Predicate? super Relationship).
 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 paul.jack...@pb.com

 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.init(EmbeddedGraphDbImpl.java:189)
 jvm 1|  at
 org.neo4j.kernel.EmbeddedGraphDatabase.init(EmbeddedGraphDatabase.java:79)
 jvm 1|  at
 com.g1.dcg.graph.neo4j.NeoGraph.init(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.init(CommonAbstractStore.java:170)
 jvm 1|  at
 org.neo4j.kernel.impl.nioneo.store.AbstractStore.init(AbstractStore.java:120)
 jvm 1|  at
 org.neo4j.kernel.impl.nioneo.store.NeoStore.init(NeoStore.java:65)
 jvm 1|  at
 org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.init(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


[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] 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 andres.tay...@neotechnology.com

 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


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 ja...@voltvoodoo.com

 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 j...@neotechnology.com 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 j...@neotechnology.com
  
   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 cr...@amanzi.com
   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 pharcos...@gmail.com
  
   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
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 



 --
 Jacob Hansson
 Phone: +46 (0) 763503395
 Twitter: @jakewins
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Adriano Almeida
Caelum

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 j...@neotechnology.com

 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 cr...@amanzi.com
 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 pharcos...@gmail.com
 
  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 pharcos...@gmail.com

 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 okramma...@gmail.com

 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 tobias.ivars...@neotechnology.com
 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 evanhave...@gmail.com

 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] 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 j...@neotechnology.com

 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


[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:

   IndexNode 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:

   CollectionNode allNodes = new ArrayListNode();

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

IterableRelationship 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) {

CollectionNode 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
attachment: graph.png___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user