[Neo4j] Querying Neo4j

2010-07-05 Thread Boban Erakovic
Hi, the reason of using neo4j is the main problem of my question. Just as Toni Menzel said "Directly falling back to the index service does not really embrace why you are a graph db at all." The question is, because my employee want to perform some project, within what he (me) will demonstrate the

Re: [Neo4j] Meta-model component: problem with renaming classes

2010-07-05 Thread Niels Hoogeveen
The modifications have been applied to trunk. Niels > Date: Mon, 5 Jul 2010 20:27:49 +0200 > From: matt...@neotechnology.com > To: user@lists.neo4j.org > Subject: Re: [Neo4j] Meta-model component: problem with renaming classes > > 2010/7/5 Niels Hoogeveen > > > > > If Mattias agrees, I suggest

Re: [Neo4j] Importing data

2010-07-05 Thread Craig Taverner
Since your data is sequential, it seems to me that the search for nodes with the same visit-id or same visitor-id is limited to only recent entries from the input log. For example, you say that the visit-id changes after 20minutes, so you only need to search back the last 20 minutes. For extremely

Re: [Neo4j] memory consumption

2010-07-05 Thread Craig Taverner
I believe the standard traverser keeps a cache of visited nodes (ids) to prevent covering the same ground again, and that will grow the memory on very deep traversals, but I would be surprised if it grew it as much as you see. I think the neo4j developers will know better. I would probably still g

Re: [Neo4j] Querying Neo4j

2010-07-05 Thread Craig Taverner
The way I view this point is that you query what you create. In other words, you should create a graph structure to suite the kinds of queries you plan to make. So if you are going to come back to the graph later on and have no idea how to find a starting point for the traversal, then be sure to ha

Re: [Neo4j] Meta-model component: problem with renaming classes

2010-07-05 Thread Niels Hoogeveen
The caching for MetaModelObjects takes place in MetaModelNamespace, so renaming and removal should take place there. > Date: Mon, 5 Jul 2010 20:27:49 +0200 > From: matt...@neotechnology.com > To: user@lists.neo4j.org > Subject: Re: [Neo4j] Meta-model component: problem with renaming classes > >

Re: [Neo4j] Querying Neo4j

2010-07-05 Thread Toni Menzel
Hi Boban, aside from using an indexing service to grab certain information from neo4j (as Paddy mentioned correctly) you certainly should get yourself learning about traversal concepts.Traversing does not mean just iterating over "elements over a single node" but traversing the whole graph (if you

Re: [Neo4j] Meta-model component: problem with renaming classes

2010-07-05 Thread Mattias Persson
2010/7/5 Niels Hoogeveen > > If Mattias agrees, I suggest adding the methods: > MetaModelNamespace#rename(String oldName, String newName) > MetaModelNamespace#remove(String name, Boolean forced) > If forced is false, throw exception when relations exist to other > MetaModelObjects or in case of a

Re: [Neo4j] Meta-model component: problem with renaming classes

2010-07-05 Thread Jörg Richter
Thank you! Highly appreciating that :-) I'm looking forward ... Cheers Jörg On Jul 5, 2010, at 17:54, Niels Hoogeveen wrote: > If Mattias agrees, I suggest adding the methods: > MetaModelNamespace#rename(String oldName, String newName) > MetaModelNamespace#remove(String name, Boolean forced)

Re: [Neo4j] Meta-model component: problem with renaming classes

2010-07-05 Thread Niels Hoogeveen
If Mattias agrees, I suggest adding the methods: MetaModelNamespace#rename(String oldName, String newName) MetaModelNamespace#remove(String name, Boolean forced) If forced is false, throw exception when relations exist to other MetaModelObjects or in case of a MetaModelClass, has associated inst

Re: [Neo4j] neo4j question

2010-07-05 Thread Alex Averbuch
Hi Paddy, Just for your information, I've been running a lot of shortest path operations on a graph of similar size to yours (approx 1 million Nodes & 5 Million Relationships). I'm using an Amazon instance with 32GB of RAM, but am only using a heap size of 8GB (as other people are sharing the same

Re: [Neo4j] Querying Neo4j

2010-07-05 Thread Paddy
here is an example i used too test the LuceneFulltextQueryIndexService search package test; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Transaction; import org.neo4j.index.IndexHits; import org.neo4j.index.IndexService; import org.neo4j

Re: [Neo4j] neo4j question

2010-07-05 Thread Peter Neubauer
Paddy, posting on the user list - yes, I think you should add RAM to hold your graph in memory, and then maybe write some routing to warm up the caches. That is, read all nodes up into RAM before you do the first search, or e.g. perform some interesting searches to load all interesting data. Would

Re: [Neo4j] Querying Neo4j

2010-07-05 Thread Paddy
you can query neo4j using the LuceneFulltextQueryIndexService here is a good example: http://wiki.neo4j.org/content/Indexing_with_IndexService#Fulltext_indexing_with_lucene_query_syntax P

[Neo4j] Importing data

2010-07-05 Thread Logo Bogo
Hi, I want to use neo4j to analyse apache logs. Each visitor is identified by a session ID, and each visit has an ID too - a new ID is assigned after 20 minutes between page views. The graph consists of Visit, Visitor and Page nodes where a Visitor -> multiple Visit nodes, and a Visit -> multip

[Neo4j] Querying Neo4j

2010-07-05 Thread Boban Erakovic
Greetings, I have some misunderstanding about neo4j. Once, when I store some nodes and relations into database, how can I query it? So I store information 5 days ago, and now I want to query? As much as I saw, I am using : Traverser traverser = node.traverse(); So I need a node to in order to

Re: [Neo4j] Meta-model component: problem with renaming classes

2010-07-05 Thread Jörg Richter
On Jul 5, 2010, at 9:13, Niels Hoogeveen wrote: > MetaModelClasses are cached in a map, so while the property may be renamed > and reindexed, the map still holds the original name value. After a restart > of the application the new value should be applied. To make renaming possible > a method

Re: [Neo4j] Meta-model component: problem with renaming classes

2010-07-05 Thread Jörg Richter
On Jul 5, 2010, at 8:57, Mattias Persson wrote: > Maybe there's some bug in the removeIndex(Node,String) method. Instead > try to do a: > > index.removeIndex(classNode1,MetaModelProperty.KEY_NAME,classNode1.getName()); > > before you set the new name I've tested this already. Indexing works

Re: [Neo4j] memory consumption

2010-07-05 Thread Qiuyan Xu
Maybe it's the reason. Does query consume a lot of memory when the graph is large? When the folder of the graph is about 300M, 1G memory seems to be not enough for the program. Cheers, Qiuyan Quoting Craig Taverner : > You mentioned that your also do queries or searches as part of the proces

Re: [Neo4j] memory consumption

2010-07-05 Thread Craig Taverner
You mentioned that your also do queries or searches as part of the process. If the graph is growing in complexity, perhaps the queries are getting slower? On Mon, Jul 5, 2010 at 10:16 AM, Qiuyan Xu wrote: > I've just checked my code. It turns out that tx.finish() is already > there and I use a no

Re: [Neo4j] memory consumption

2010-07-05 Thread Qiuyan Xu
I've just checked my code. It turns out that tx.finish() is already there and I use a normal inserter. In each program I try to insert 10 data and I restart the transaction every 500 insertions. The problem is, when I execute the program for about the 15th time, it runs slowly shortly af

Re: [Neo4j] Neo4j REST, python, prune evaluator trick/hack, and some more Q.

2010-07-05 Thread Mattias Persson
2010/7/5 Sergey Nikitin > Hi! I'v found that it is possible to alter database data inside > traversal query like this: > > *PYTHON DICT* > ... >"prune evaluator": { > "language": "javascript", > "body": """ > if(position.node().getId().equals(12)){ >position.node().setP

Re: [Neo4j] Meta-model component: problem with renaming classes

2010-07-05 Thread Niels Hoogeveen
MetaModelClasses are cached in a map, so while the property may be renamed and reindexed, the map still holds the original name value. After a restart of the application the new value should be applied. To make renaming possible a method needs to be added to MetaModelNamespace. Niels > Date: M

[Neo4j] Neo4j REST, python, prune evaluator trick/hack, and some more Q.

2010-07-05 Thread Sergey Nikitin
Hi! I'v found that it is possible to alter database data inside traversal query like this: *PYTHON DICT* ... "prune evaluator": { "language": "javascript", "body": """ if(position.node().getId().equals(12)){ position.node().setProperty('some_property','some_value');