Re: [Neo4j] upgrading Neo4j 1.0 to 1.7/1.8

2012-06-25 Thread Mattias Persson
I'm not entirely sure, but there's a chance you could upgrade from 1.0 to
1.5 directly and then take each step from there. Try that perhaps?

2012/6/25 Stefan Armbruster ml...@armbruster-it.de

 Hi,

 I've got a legacy application here using a Neo4j 1.0 (sic!) datastore.
 This is now to be upgraded. I understood from the docs that setting
 allow_store_upgrade=true and then starting up and shutting down the DB
 with each in-between Neo4j release should be a way to go. So the steps are:
 1.0 - 1.1
 1.1 - 1.2
 1.2 - 1.3
 1.3 - 1.4
 1.4 - 1.5
 1.5 - 1.6
 1.6 - 1.7
 1.7 - 1.8

 Some questions regarding this:
 1) http://neo4j.org/download/ only contains download links starting with
 Neo4j 1.5.x and newer. Where do I find the old versions?
 2) Are they any steps that could be skipped?

 Thx,
 Stefan
 ___
 NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j

 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] setRelationshipProperty() in BatchInserter

2012-06-20 Thread Mattias Persson
I'm almost positive that this is due to a bug which was
fixedhttps://github.com/neo4j/community/commit/e75d33e4bba05b2697f9b7c4778dd55f84b09f9f13:th
april, i.e. the fix is in1.8.M01 and later. Could you try your
inserter with a more recent version?

2012/6/12 Mattias Persson matt...@neotechnology.com

 And a simple test case to reproduce perhaps?


 2012/6/5 Michael Hunger michael.hun...@neotechnology.com

 Can you share the exception?

 Michael

 Am 05.06.2012 um 16:14 schrieb Sarnath K - ERS, HCLTech:

  All,
 
  We were able to successfully create a Neo4J Graph database (1.7.2)
 using Batch Insert.
  Able to view the same through the browser (via the REST API)
 
  However, we ran into problems when trying to use
 setRelationshipProperty API.
  Here is the sequence that leads to the problem:
 
  1.Create a Relationship
 
  2.Add a set of Key-Value Pairs as properties - Let us call this
 Unique set A
 
  3.Add another set of Key-Value pairs as properties, Let us call
 this Unique set B
 
  4.A Intersection B is non-null i.e. Sets A and B can have same Keys.
 
  5.When we encounter common keys, we just read existing property
 value, append the new property value and call setRelationshipProperty()
 API with the new updated property value
 
  However, Step 5 causes exception in PropertyStore.java
 
  To our naïve eyes, it looks to be a bug.
  Can somebody help us here?
 
  Many Thanks,
  Best Regards,
  Sarnath
 
 
  ::DISCLAIMER::
 
 
 
  The contents of this e-mail and any attachment(s) are confidential and
 intended for the named recipient(s) only.
  E-mail transmission is not guaranteed to be secure or error-free as
 information could be intercepted, corrupted,
  lost, destroyed, arrive late or incomplete, or may contain viruses in
 transmission. The e mail and its contents
  (with or without referred errors) shall therefore not attach any
 liability on the originator or HCL or its affiliates.
  Views or opinions, if any, presented in this email are solely those of
 the author and may not necessarily reflect the
  views or opinions of HCL or its affiliates. Any form of reproduction,
 dissemination, copying, disclosure, modification,
  distribution and / or publication of this message without the prior
 written consent of authorized representative of
  HCL is strictly prohibited. If you have received this email in error
 please delete it and notify the sender immediately.
  Before opening any email and/or attachments, please check them for
 viruses and other defects.
 
 
 
  ___
  NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j
 
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user

 ___
 NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j

 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.com




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] setRelationshipProperty() in BatchInserter

2012-06-12 Thread Mattias Persson
And a simple test case to reproduce perhaps?

2012/6/5 Michael Hunger michael.hun...@neotechnology.com

 Can you share the exception?

 Michael

 Am 05.06.2012 um 16:14 schrieb Sarnath K - ERS, HCLTech:

  All,
 
  We were able to successfully create a Neo4J Graph database (1.7.2) using
 Batch Insert.
  Able to view the same through the browser (via the REST API)
 
  However, we ran into problems when trying to use
 setRelationshipProperty API.
  Here is the sequence that leads to the problem:
 
  1.Create a Relationship
 
  2.Add a set of Key-Value Pairs as properties - Let us call this
 Unique set A
 
  3.Add another set of Key-Value pairs as properties, Let us call this
 Unique set B
 
  4.A Intersection B is non-null i.e. Sets A and B can have same Keys.
 
  5.When we encounter common keys, we just read existing property
 value, append the new property value and call setRelationshipProperty()
 API with the new updated property value
 
  However, Step 5 causes exception in PropertyStore.java
 
  To our naïve eyes, it looks to be a bug.
  Can somebody help us here?
 
  Many Thanks,
  Best Regards,
  Sarnath
 
 
  ::DISCLAIMER::
 
 
 
  The contents of this e-mail and any attachment(s) are confidential and
 intended for the named recipient(s) only.
  E-mail transmission is not guaranteed to be secure or error-free as
 information could be intercepted, corrupted,
  lost, destroyed, arrive late or incomplete, or may contain viruses in
 transmission. The e mail and its contents
  (with or without referred errors) shall therefore not attach any
 liability on the originator or HCL or its affiliates.
  Views or opinions, if any, presented in this email are solely those of
 the author and may not necessarily reflect the
  views or opinions of HCL or its affiliates. Any form of reproduction,
 dissemination, copying, disclosure, modification,
  distribution and / or publication of this message without the prior
 written consent of authorized representative of
  HCL is strictly prohibited. If you have received this email in error
 please delete it and notify the sender immediately.
  Before opening any email and/or attachments, please check them for
 viruses and other defects.
 
 
 
  ___
  NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j
 
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user

 ___
 NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j

 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Accessing node properties with batch inserter

2012-02-15 Thread Mattias Persson
2012/2/15 Peter Neubauer peter.neuba...@neotechnology.com

 Paul,
 that GDB instance you get is NOT supporting deletions or transactions
 (it does just ignore them) it's more for reading stuff. See the
 JavaDoc for the method:

/**
 *
 * @return a GraphDatabaseService that does not support deletion
 and transactions
 */
public GraphDatabaseService getGraphDbService();

 When having a Batchinserter open, please do all modifications via it ...

 I think it should work regardless though...


 Cheers,

 /peter neubauer

 G:  neubauer.peter
 S:  peter.neubauer
 P:  +46 704 106975
 L:   http://www.linkedin.com/in/neubauer
 T:   @peterneubauer

 Neo4j 1.6 released - dzone.com/6S4K
 The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/



 On Tue, Feb 14, 2012 at 10:33 PM, Paul A. Jackson paul.jack...@pb.com
 wrote:
  Just started using the batch inserter and I think I am missing a basic
 concept.
 
  This code snippet using Neo 1.5 returns a zero-length map. I would
 expect it to have a single property (MyKey).
 
 String storeDir = ./neodb;
 deleteDirectory(new File(storeDir));
 BatchInserter batchInserter = new BatchInserterImpl(storeDir);
 GraphDatabaseService graph = batchInserter.getGraphDbService();
 Transaction transaction = graph.beginTx();
 Node node = graph.createNode();
 long id = node.getId();
 node.setProperty(MyKey, MyValue);
 transaction.success();
 transaction.finish();
 MapString,Object properties = batchInserter.getNodeProperties(id);
// properties is empty
 
  I added the Transaction stuff for testing, but was expecting that to not
 be necessary as well.
 
  Thanks,
 
  Paul Jackson, Principal Software Engineer
  Pitney Bowes Software
  4200 Parliament Place | Suite 600 | Lanham, MD  20706-1844  USA
  O: 301.918.0850 | M: 703.862.0120 | www.pb.com
  paul.jack...@pb.com
 
  Every connection is a new opportunityT
 
 
 
  Please consider the environment before printing or forwarding this
 email. If you do print this email, please recycle the paper.
 
  This email message may contain confidential, proprietary and/or
 privileged information. It is intended only for the use of the intended
 recipient(s). If you have received it in error, please immediately advise
 the sender by reply email and then delete this email message. Any
 disclosure, copying, distribution or use of the information contained in
 this email message to or by anyone other than the intended recipient is
 strictly prohibited. Any views expressed in this message are those of the
 individual sender, except where the sender specifically states them to be
 the views of the Company.
 
 
  ___
  NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j
 
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 ___
 NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j

 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] SpringDataNeo4j 2.0 Supernode navigation

2012-01-16 Thread Mattias Persson
With this branch you have expected getRelationships time regardless of how
many other relationships that node also has got, since only the
relationships that you request are loaded (based on type and direction).
You can also get an accurate relationship count (even for a given
relationship type and direction) as an O(1) operation.

2012/1/15 Peter Neubauer peter.neuba...@neotechnology.com

 Agelos,
 supernode support for these cases will be handled below SDN. Mattias
 has been spiking this in
 https://github.com/neo4j/community/tree/super-node-support but we have
 had no time to merge this in, since the QA on store changes is
 non-trivial.

 Cheers,

 /peter neubauer

 Google:neubauer.peter
 Skype: peter.neubauer
 Phone: +46 704 106975
 LinkedIn:  http://www.linkedin.com/in/neubauer
 Twitter:@peterneubauer
 Tungle:tungle.me/peterneubauer

 brew install neo4j  neo4j start
 heroku addons:add neo4j



 On Thu, Jan 12, 2012 at 8:22 PM, Agelos Pikoulas
 agelos.pikou...@gmail.com wrote:
  Hello everyone, just watched Michael Hunger on the Spring Data Neo4j
  webinar - thanks Michael.
 
  Now to the question, its an old problem - the supernode relationship
  navigation:
 
  Assume a *Movie *node has N.000.000 incoming *LIKES *from *User *nodes,
 but
  only a few incoming *ACTS_IN *from *Actor* nodes.
 
  How would we navigate in SDN from *Movie *onto these *ACTS_IN
 *relationships
   *Actor *nodes via an indexed relationship (eg
  IndexedRelationShipExpander), without stumping onto those 1M *LIKES
  *relationships
  that will put a huge delay on us ?
 
  Regards
 
  Agelos
  ___
  NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j
 
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 ___
 NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j

 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Copy all the Relationships to another Node

2012-01-12 Thread Mattias Persson
A straightforward:

  Node target = db.createNode();
  copyProperties( source, target );
  for ( Relationship sourceRel : source.getRelationships() ) {
  Relationship targetRel = source.equals( sourceRel.getStartNode() ) ?
  target.createRelationshipTo( sourceRel.getEndNode(),
sourceRel.getType() ) :
  sourceRel.getEndNode().createRelationshipTo( target,
sourceRel.getType() );
  copyProperties( sourceRel, targetRel );
  sourceRel.delete();
  }
  source.delete();
...
  private static void copyProperties( PropertyContainer source,
PropertyContainer target ) {
  for ( String key : source.getPropertyKeys() )
  target.setProperty( key, source.getProperty( key ) );
  }

would suffice, I'd guess.

2012/1/12 Emil Dombagolla em...@hsenidoutsourcing.com

 Hi All,

 I am using Java API with neo4j 1.4.2.

 I want to copy all the relationships(Income/Outgoing) of a node to another
 node and delete the original node. Can anyone suggest what will be the
 easiest way.

 Emil Dombagolla,
 Thank you so much.
 ___
 NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j

 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] There's already an HA cluster managed by this ZooKeeper cluster

2011-12-14 Thread Mattias Persson
I'm getting a 404 on that link.

2011/12/6 Michael Hunger michael.hun...@neotechnology.com

 Answer from Mahesh:

 Hi,

 Anirudha is a part of our team.

 We are using 1.5 in a 3 server setup on different physical machines.

 The messages.log from the server failing to start is as follows.
 (https://gist.github.com/1433340;cid=1323211777524-299)
 Here is the messages.log file on the server that is failing

 Hope this helps you help us..

 Cheers...

 Mahesh

 Am 05.12.2011 um 09:03 schrieb Peter Neubauer:

  Hi there,
  what version are you running, any chance you could collect the
  messages.log from the instances and send them over?
 
  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
 
  brew install neo4j  neo4j start
  heroku addons:add neo4j
 
 
 
  On Fri, Dec 2, 2011 at 3:08 PM, anirudha anir...@thoughtworks.com
 wrote:
  Hi,
 
  We are trying to setup neo4j in high-availability mode with 3 nodes in
 the
  cluster.
  When we restart any of the neo4j servers, it fails. We get following
  exception:
 
  == neo4j-zookeeper.log ==
  ERROR main-EventThread org.apache.zookeeper.ClientCnxn - Error while
 calling
  watcher
  java.lang.RuntimeException: There's already an HA cluster managed by
 this
  ZooKeeper cluster
 at
 org.neo4j.kernel.ha.zookeeper.ZooClient.getRoot(ZooClient.java:370)
 at
 
 org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager.getAllMachines(AbstractZooKeeperManager.java:194)
 at
 
 org.neo4j.kernel.ha.zookeeper.AbstractZooKeeperManager.getMasterFromZooKeeper(AbstractZooKeeperManager.java:134)
 at
 org.neo4j.kernel.ha.zookeeper.ZooClient.process(ZooClient.java:122)
 at
 
 org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:530)
 at
 org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:506)
 
 
  If we delete the database folder graph.db and then start the server,
 it
  starts with no exception and syncs the data.
  Am I missing any configuration?
 
  Thanks.
 
  --
  View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/There-s-already-an-HA-cluster-managed-by-this-ZooKeeper-cluster-tp3554731p3554731.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

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] TransactionDataImpl.deletedNodes not an ordered set

2011-12-14 Thread Mattias Persson
It's not only an issue with TransactionDataImpl. All the internal state in
a transaction is kept without ordering information because neo4j doesn't do
ordering guarantees in general. It would require a bigger change and could
introduce memory and performance overhead to do so. Why is the order there
important to you?

2011/12/8 tcolar tco...@colar.net

 Hi,

 We use the Neo4JCommitListener to synchronize some neo4j data back to a
 database.

 I have an issue when trying to deal with the delete events.

 I delete nodes in a particular order in neo4j (it's a nested set, so
 down-up
 ), but when getting the events in the commitListener the order is not
 respected (random), this is because deletedNodes is not an ordered set.

 private final CollectionNode deletedNodes = new HashSetNode();

 I think it would make sense to have that ordered, like:

 private final CollectionNode deletedNodes = new LinkedHashSetNode();

 Otherwise I don't see a reliable way to resolve this kind of issues.

 Note that the same issue probably applies to the other collections in there
 as well.

 Thanks


 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/TransactionDataImpl-deletedNodes-not-an-ordered-set-tp3571499p3571499.html
 Sent from the Neo4j Community Discussions mailing list archive at
 Nabble.com.
 ___
 NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
 register and consider posting at
 https://groups.google.com/forum/#!forum/neo4j

 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] HA starting issue

2011-12-13 Thread Mattias Persson
It seems that ZooKeeper configuration could be invalid. The HA db doesn't
get in contact with it.

2011/12/6 lawrence.bandeira lawrence.bande...@gmail.com

 Follow the logs !!!


 http://neo4j-community-discussions.438527.n3.nabble.com/file/n3565025/console.log
 console.log

 http://neo4j-community-discussions.438527.n3.nabble.com/file/n3565025/neo4j.0.0.log
 neo4j.0.0.log

 http://neo4j-community-discussions.438527.n3.nabble.com/file/n3565025/neo4j-zookeeper.log
 neo4j-zookeeper.log

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-HA-starting-issue-tp3260535p3565025.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] NeoEclipse overlapping relations

2011-12-13 Thread Mattias Persson
You can choose to hide certain relationship types in some menu somewhere...
But in general overlapping relationships is a problem in Neoclipse I think

2011/12/7 nrkkalyan nrkkal...@gmail.com

 I would like to know if there is a way to see the relations on neoeclipse
 propertly, I created a family relation and tried to view the relation in
 neoeclipse, but it seems the relations are been overlapped.

 Image:

 http://neo4j-community-discussions.438527.n3.nabble.com/file/n3565999/neo4j-family-relation.png

 Am I doing something missing in settings?

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/NeoEclipse-overlapping-relations-tp3565999p3565999.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] ODBC connection

2011-12-13 Thread Mattias Persson
Rickard, didn't you write a JDBC driver for Cypher recently?

2011/12/7 patenlee leo.de.vr...@bpsolutions.nl

 I want to access from an external application Neo4j objects. Does anybody
 know if a Neo4J ODBC driver is available to access the Neo4j objects.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/ODBC-connection-tp3566658p3566658.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [Neo4j-User] Queries about HA

2011-12-06 Thread Mattias Persson
2011/12/6 Samuel Feng okos...@gmail.com

 Thanks Peter,

 I studied how the HA works in
 http://docs.neo4j.org/chunked/snapshot/ha-how.html. It mentioned that If
 the new master is elected and performs changes before the old master
 recovers, there will two different versions of the data. The old master
 will not be able to attach itself to the cluster and will require
 maintenance (replace the wrong version of the data with the one running in
 the cluster.

 Say, I have two neo4j instances(A  B) running, When instance A crashed, B
 continues to work and has many writes on it. Then Server A is recovered but
 it can not attach itself to the cluster as the wrong data version. So I
 need to manually replace the instance A's data using B's.

 But the graph size is around 4G, I have to copy all the 4G data to server
 A? Or any other simple and fast ways?

 Sorry that page seems outdated. Most often a previous master can rejoin
the cluster as a slave when it starts up and recovers, and if it sees that
its data has branched from the new master it will grab a new copy
automatically from the new master. I'll rewrite it right away.

And about moving to HA mode... the main difference code-wise is that you do:

new HighlyAvailableGraphDatabase(...)

instead of

new EmbeddedGraphDatabase(...)

So you can run HA in embedded or server mode, which ever you like.

Regards,

 Samuel

 2011/12/6 Peter Neubauer peter.neuba...@neotechnology.com

  Samuel,
  I would recommend HA for your usecase, since then the Neo4j cluster
  will handling new neo4j instances appearing and copying data etc. Look
  at http://docs.neo4j.org/chunked/snapshot/ha.html for setup docs.
 
  There seems to be some interest in RMI remoting to neo4j. However, we
  think this is not the ultimate way to go in the long run since it is
  Java-centric and still not fast and stable enough for want we want to
  achieve. However, if the community finds it useful, I am all up for
  someone stepping up and invest the last mile to make it good, maybe
  put it on GIThub for easier collaboration, of course.
 
  Tobias original code is at
  https://svn.neo4j.org/components/remote-graphdb/trunk/, and the API
  should not have moved terribly out of sync, so I guess it is not a LOT
  of work to at least get it working.
 
  Anyone?
 
  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
 
  brew install neo4j  neo4j start
  heroku addons:add neo4j
 
 
 
  On Tue, Dec 6, 2011 at 4:43 AM, Samuel Feng okos...@gmail.com wrote:
   Dear List,
  
   I'm using neo4j 1.5GA and using embeddedGraphDatabase to access the
  graph.
   Now the graph size is around 4G.
  
   Now I would like to try HA mode and have several questions.
  
   1) Can I access the graph in some kind of remote mode? So that I can
 use
   many tomcat servers to access the graph remotely and do not need to
  change
   any code. I understand neo4j can run as a server, however, we can only
  use
   REST api to accessing the neo4j server, this will cause many many code
   changes for me. Please correct me if I have any misunderstanding.
  
   Seems there is a neo4j-remote-graphdb component which uses RMI to
 access
  a
   graph remotely. BUT in the wiki
   http://components.neo4j.org/neo4j-remote-graphdb/stable/, you
 mentioned
  The
   implementation is not speedy enough to be used as the main access
 channel
   to a Graph Database for actual applications.
  
   2) If I use neo4j embedded in HA mode, say, I have two neo4j
 instances(A
  
   B) running, When instance A crashed, B continues to work and has many
   writes on it. Then Server A is recovered but it can not attach itself
 to
   the cluster as the wrong data version. So I need to manually replace
 the
   instance A's data using B's.
  
   But the graph size is around 4G, I have to copy all the 4G data to
 server
   A? Or any other simple and fast ways?
  
   Thanks and Regards,
  
   Samuel
   ___
   Neo4j mailing list
   User@lists.neo4j.org
   https://lists.neo4j.org/mailman/listinfo/user
  
   --
   You received this message because you are subscribed to the Google
  Groups Neo4j User Discussions group.
   To post to this group, send email to u...@neo4j.org.
   To unsubscribe from this group, send email to
 user+unsubscr...@neo4j.org
  .
   For more options, visit this group at
  http://groups.google.com/a/neo4j.org/group/user/?hl=en.
  
  ___
  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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com

Re: [Neo4j] REST Traversal and prune evaluators

2011-12-05 Thread Mattias Persson
Currently there's no way to get a fast count of number of relationships,
but this has been worked on so that you can get number of relationships per
type/direction without actually looping through them. When it will go into
the product I don't know yet. The best you can do in the meantime is to
keep that counter as a property on each node which you update manually,
maybe even as a transaction event
handlerhttp://api.neo4j.org/current/org/neo4j/graphdb/GraphDatabaseService.html#registerTransactionEventHandler%28org.neo4j.graphdb.event.TransactionEventHandler%29
.

2011/12/2 Krzysztof Raczyński racz...@gmail.com

 Hello folks, i've been trying to prune based on number of outgoing
 relationships, but so far i am stumped,
 since org.neo4j.graphdb.Node interface doesn't expose any way to count
 outgoing relationships. Traversal is for
 tree visualisation, and i want to avoid creating too much of a
 clutter, hence the outgoing relationship limit. My code right now:

t = neo4j.TraversalDescription().\
max_depth(3).relationships('rel_type','out').\

  prune('javascript','position.endNode().getProperty(some_property)
 = 192')

 I would like to prune nodes that have more than 10 outgoing relationships.

 godspeed, graphistas
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Log message for unmanaged extension

2011-12-05 Thread Mattias Persson
I'd not expect that to end up in messages.log. messages.log is the internal
logger for forensics purposes. How did you configure the logger? Is it
log4j or jul?

2011/12/3 Peter Neubauer peter.neuba...@neotechnology.com

 Mmh,
 good question. I think they should get out into messages.log, maybe
 you could raise an issue about this so we can track the missing
 message down?

 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

 brew install neo4j  neo4j start
 heroku addons:add neo4j



 On Fri, Dec 2, 2011 at 7:12 AM, Brendan cheng ccp...@hotmail.com wrote:
 
  Hi,
  I tried to debug my unmanaged extension with
  private static final Logger log = Logger.getLogger(Register.class);
  and
  generate a message like:
  log.warn(passed check point 1);
  But I couldn't find any these messages from any log files,
 neo4j.0.0.log, console.log, message.log...etc
  How should I setup the log message?
  Regards,
  Brendan
  ___
  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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Auto-warming the Neo4J caches

2011-12-05 Thread Mattias Persson
Warming up the graph is best done by warming up the graph, so to speak.
Every warmup use case is different, and for warming up the entire graph
you'll have to loop through all nodes and get their relationships and if
you'd like to have properties in there too then load them also. The most
basic being:

for ( Node node : db.getAllNodes() ) {
   IteratorUtil.count( node.getRelationships() );
}

Or in 1.6.M01 you can do:

for ( Node node : GlobalGraphOperations.at( db ).getAllNodes() );
for ( Relationship rel : GlobalGraphOperations.at( db
).getAllRelationships() );

pro here is that reading the store sequentially (0-max) is faster than
random access. But the list of relationships each node have isn't loaded
this way, only the relationships themselves. I don't know which one ends up
the best for you.

2011/12/5 Ian Forsey for...@gmail.com

 Hi there,

 I'm looking to get my entire graph into memory.

 I've configured the file buffer cache, but nodes/rels don't get added into
 the cache until I first query them. Is it just a case of traversing the
 entire graph to warm-up the cache on application startup? Or is there
 another way to tell neo4j to load the entire graph into memory on start up?

 Thanks

 Ian
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Auto-warming the Neo4J caches

2011-12-05 Thread Mattias Persson
You're referring to the file system caches managed by the operating system,
right? That neo4j has no control over and is up to the specific OS you run
it on.

2011/12/5 Ian Forsey for...@gmail.com

 Thanks Mattias,

 I'll try that out.

 Playing about, I've noticed that the file buffer cache seems to survive
 restarts. Is this correct? Is it guaranteed that the whole file buffer
 cache will survive?

 On 5 December 2011 14:09, Mattias Persson matt...@neotechnology.com
 wrote:

  Warming up the graph is best done by warming up the graph, so to speak.
  Every warmup use case is different, and for warming up the entire graph
  you'll have to loop through all nodes and get their relationships and if
  you'd like to have properties in there too then load them also. The most
  basic being:
 
  for ( Node node : db.getAllNodes() ) {
IteratorUtil.count( node.getRelationships() );
  }
 
  Or in 1.6.M01 you can do:
 
  for ( Node node : GlobalGraphOperations.at( db ).getAllNodes() );
  for ( Relationship rel : GlobalGraphOperations.at( db
  ).getAllRelationships() );
 
  pro here is that reading the store sequentially (0-max) is faster than
  random access. But the list of relationships each node have isn't loaded
  this way, only the relationships themselves. I don't know which one ends
 up
  the best for you.
 
  2011/12/5 Ian Forsey for...@gmail.com
 
   Hi there,
  
   I'm looking to get my entire graph into memory.
  
   I've configured the file buffer cache, but nodes/rels don't get added
  into
   the cache until I first query them. Is it just a case of traversing the
   entire graph to warm-up the cache on application startup? Or is there
   another way to tell neo4j to load the entire graph into memory on start
  up?
  
   Thanks
  
   Ian
   ___
   Neo4j mailing list
   User@lists.neo4j.org
   https://lists.neo4j.org/mailman/listinfo/user
  
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] allSimplePaths performance

2011-11-28 Thread Mattias Persson
I think I'd need your dataset to be able to reproduce and fix it, would
that be possible?

2011/11/25 Petar Dobrev petar.dob...@myphilanthropedia.org

 On Fri, Nov 25, 2011 at 7:59 PM, Mattias Persson
 matt...@neotechnology.comwrote:

 
  Correct, it finds paths on that depth only. If other paths are
 encountered
  along the way they aren't returned.
 
 

 However, in the example I provided it misses a path that is present on the
 desired depth, that's what I was actually wondering about.

 In this example:

 The source of the testing program is here: https://gist.github.com/1391654
 Output before adding the additional relationship:
 https://gist.github.com/1391668
 Output after adding the additional relationship:
 https://gist.github.com/1391661

 shortestPath misses one path (at depth 3) unless an additional relationship
 is present, which is unrelated to the paths between the nodes.

 Petar
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Server tuning, caches lucene

2011-11-28 Thread Mattias Persson
I'm not an expert on Lucene memory usage, and I think that the Lucene
community http://lucene.apache.org/java/docs/mailinglists.html would be
able to answer such lucene-specific questions more accurately.

Best,
Mattias

2011/11/25 Stephen glur...@gmail.com

 Mostly I'd like to understand whether I'm limiting the performance of index
 queries by not allowing enough of them to reside in RAM.

 For setting a limit, either global or per-index would be fine. I am just
 guessing, but it seems like co-ordinating the global limit across multiple
 indexes would be somewhat complex, and it's easy enough for me as an
 application developer to choose the indexes I know will be hottest and
 increase their limits individually.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Server-tuning-caches-lucene-tp3534729p3536814.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Property String too long

2011-11-28 Thread Mattias Persson
Yeah I think you ran into a groovy http://groovy.codehaus.org/-specific
issue with string length

2011/11/28 himmel24 heckoli...@yahoo.de

 I found a workaround

 You can put properties longer then 65535 via the REST - API

 I had success to store the very big web-page via REST / AJAX

 look at:


 http://docs.neo4j.org/chunked/snapshot/rest-api-node-properties.html#rest-api-set-property-on-node

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Property-String-too-long-tp3541576p3541894.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Upgrading data from 1.5M2 to 1.5GA

2011-11-28 Thread Mattias Persson
Could you please send data/db/messages.log? (to me directly perhaps, since
the user list can't accept attachments)

2011/11/28 KanTube mich...@mkanner.com

 1) stopped 1.5M2 server
 2) neo4j.bat remove
 3) installed 1.5GA files
 4) neo4j.bat install on the 1.5GA server
 starts just fine
 5) stopped 1.5GA server
 6) copied 1.5M2 Data directory files to 1.5GA data directory
 7) start service

 received an error that the server would not start

 what am i doing wrong?

 My setup is window7x64

 thanks

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Upgrading-data-from-1-5M2-to-1-5GA-tp3542765p3542765.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] allSimplePaths performance

2011-11-25 Thread Mattias Persson
2011/11/25 Petar Dobrev petar.dob...@myphilanthropedia.org

 Thanks for the explanation, Mattias!

 So, if I understand this correctly, due to some of
 the optimizations, shortestPath algo might miss some paths when used
 with  findPathsOnMaxDepthOnly.
 And that's by design so to speak, it's not a bug or something, correct?


Correct, it finds paths on that depth only. If other paths are encountered
along the way they aren't returned.


 Thanks!

 Petar

 On Thu, Nov 24, 2011 at 8:36 PM, Mattias Persson
 matt...@neotechnology.comwrote:

  There are several optimizations that the shortest path algo does that
  allSimplePaths doesn't, f.ex:
 
  * Traversal is bidirectional (it starts from the start AND the end
  simultaneously, although in the same thread) which means that the deeper
  the traversal goes the more it gains compared to a single directional
  traversal
  * It stops on the depth it finds the first hit on
 
  Shortest path algo is implemented from scratch to be optimized for just
  that, but allSimplePaths uses traversal framework which doesn't support
  bidirectional traversals yet, although there have been some experiments
  with that too so perhaps soon!
 
  2011/11/24 Peter Neubauer peter.neuba...@neotechnology.com
 
   Petar,
   very cool if this worked out. Maybe you could write up a testcase that
   verifies that the results are the same, and then put this as a fork to
   the graphalgo package? Sounds like a great addition if this works 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  - NOSQL for the Enterprise.
   http://startupbootcamp.org/- Öresund - Innovation happens HERE.
  
  
  
   On Thu, Nov 24, 2011 at 11:42 AM, Petar Dobrev peter.dob...@gmail.com
 
   wrote:
Hi guys,
   
I have a graph of about 2.5M nodes and 8M relationships and I am
 trying
   to
find all simple paths between two nodes with maximum depth of 8.
   
The allSimplePaths graph algo works well for maximum depth of 5, but
  for
   8
it runs really long (I didn't even wait for it to finish). So I
 thought
it's just that the graph is too complicated and the search operation
 is
very expensive.
   
On the other hand I noticed that shortestPath and pathsWithLength
 both
   work
fast. So I tried this experiment:
   
  - Run shortestPath and record the shortest length
  - Iterate from the shortest length to max_depth
 - Run pathsWithLength and append the results
 -
   
And it turns out to be working really well.. much, much faster than
 the
allSimplePaths solution, which I found quite baffling, since the
 latter
solution should be doing more work to accomplish the same task.
   
Maybe it's just with my graph, but it's still weird.
   
Best regards,
Petar
___
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
  
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.com
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 



 --
 Petar Dobrev
 Engineer
 Philanthropedia
 http://www.myphilanthropedia.org
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Server tuning, caches lucene

2011-11-25 Thread Mattias Persson
It isn't possible to set memory limitations currently. Would you like to
give each lucene index a max limit it can hog, or rather a max limit for
all indices together or something else?

2011/11/25 Stephen glur...@gmail.com

 I wasn't subscribed when I sent this the first time:

 Hi, I'm currently trying to benchmark the neo4j rest server, and I haven't
 been able to find any sort of configuration regarding the lucene indexes.
 Specifically, I'm wondering if it's possible to configure if/how the
 indexes
 are memory mapped or cached? My use case involves a lot of index lookups
 and
 I can't tell whether they are configured optimally.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Server-tuning-caches-lucene-tp3534729p3535049.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] allSimplePaths performance

2011-11-24 Thread Mattias Persson
There are several optimizations that the shortest path algo does that
allSimplePaths doesn't, f.ex:

* Traversal is bidirectional (it starts from the start AND the end
simultaneously, although in the same thread) which means that the deeper
the traversal goes the more it gains compared to a single directional
traversal
* It stops on the depth it finds the first hit on

Shortest path algo is implemented from scratch to be optimized for just
that, but allSimplePaths uses traversal framework which doesn't support
bidirectional traversals yet, although there have been some experiments
with that too so perhaps soon!

2011/11/24 Peter Neubauer peter.neuba...@neotechnology.com

 Petar,
 very cool if this worked out. Maybe you could write up a testcase that
 verifies that the results are the same, and then put this as a fork to
 the graphalgo package? Sounds like a great addition if this works 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  - NOSQL for the Enterprise.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.



 On Thu, Nov 24, 2011 at 11:42 AM, Petar Dobrev peter.dob...@gmail.com
 wrote:
  Hi guys,
 
  I have a graph of about 2.5M nodes and 8M relationships and I am trying
 to
  find all simple paths between two nodes with maximum depth of 8.
 
  The allSimplePaths graph algo works well for maximum depth of 5, but for
 8
  it runs really long (I didn't even wait for it to finish). So I thought
  it's just that the graph is too complicated and the search operation is
  very expensive.
 
  On the other hand I noticed that shortestPath and pathsWithLength both
 work
  fast. So I tried this experiment:
 
- Run shortestPath and record the shortest length
- Iterate from the shortest length to max_depth
   - Run pathsWithLength and append the results
   -
 
  And it turns out to be working really well.. much, much faster than the
  allSimplePaths solution, which I found quite baffling, since the latter
  solution should be doing more work to accomplish the same task.
 
  Maybe it's just with my graph, but it's still weird.
 
  Best regards,
  Petar
  ___
  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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Fwd: Lucene Custom Sort in Neo4j

2011-11-22 Thread Mattias Persson
As a parameter to the index GET perhaps?

GET .../index/node/myindex?query=name:*sort=GivenNameorder=desc

2011/11/22 Peter Neubauer peter.neuba...@neotechnology.com

 I agree.
 Sending arbitrary Groovy is not what you want a database to execute. Do you
 see any good index - neutral way to expose this? It's even very relevant to
 Cypher...

 /peter

 Sent from my phone, please excuse typos and autocorrection.
 On Nov 22, 2011 4:46 AM, Tatham Oddie tat...@oddie.com.au wrote:

 
 
  --
  Tatham Oddie
  Tiny keyboard = tiny message
 
  Begin forwarded message:
 
  From: Tatham Oddie tatham.od...@readify.onmicrosoft.commailto:
  tatham.od...@readify.onmicrosoft.com
  Date: 22 November 2011 14:43:00 AEDT
  To: tat...@oddie.com.aumailto:tat...@oddie.com.au 
 tat...@oddie.com.au
  mailto:tat...@oddie.com.au
  Subject: FW: Lucene Custom Sort in Neo4j
 
 
 
  From: Tatham Oddie [mailto:tatham.od...@readify.onmicrosoft.com]
  Sent: Tuesday, 22 November 2011 2:42 PM
  To: Romiko Derbynew; user@lists.neo4j.orgmailto:user@lists.neo4j.org
  Cc: mystory-develop...@barnardos.org.aumailto:
  mystory-develop...@barnardos.org.au; Tatham Oddie
  Subject: RE: Lucene Custom Sort in Neo4j
 
 
 
 http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-an-arbitrary-groovy-script---lucene-sorting
 
  Send something like this via /ext/GremlinPlugin/graphdb/execute_script:
 
  import org.neo4j.graphdb.index.*
  import org.neo4j.index.lucene.*
  import org.apache.lucene.search.*
  neo4j = g.getRawGraph()
  idxManager = neo4j.index()
  clientIndex = idxManager.forNodes('agency123-clients')
  query = new QueryContext( 'FamilyName:Smith' ).sort( new Sort(new
  SortField( 'GivenName',SortField.STRING, true ) ) )
  results = clientIndex.query( query )
 
  Pros:
 
 
  · It’ll work
 
  Cons:
 
 
  · You’d might as well stop calling it the “REST” API
 
  · It’s fragile to changes in either the “REST” API or the Java
 API
  – twice the chance of getting bitten
 
  · It requires us to string concatenate snippets of Java code
  together within our C#
 
  If you go down this route, please bury it very very deep in Neo4jClient
  and expose a nicer API signature on top. :)
 
 
  -- Tatham
 
 
  From: Romiko Derbynew [mailto:romiko.derby...@readify.onmicrosoft.com
  ]mailto:[mailto:romiko.derby...@readify.onmicrosoft.com]
  Sent: Tuesday, 22 November 2011 2:36 PM
  To: user@lists.neo4j.orgmailto:user@lists.neo4j.org
  Cc: mystory-develop...@barnardos.org.aumailto:
  mystory-develop...@barnardos.org.au; Tatham Oddie
  Subject: Lucene Custom Sort in Neo4j
 
  Hi Guys,
 
  What is the easiest way for me to build a custom full text sort for
 lucene
  in Neo4j, the thing is, we use the REST API to query the index, and I
 would
  like to apply a custom sort
 
  e.g.
 
  I want to change sorting to:
  Sort by Relevance (Booster) then by IndexKey1 then by indexKey2.
 
  Currently, we have the default sort via the query parser api, but it is
  not powerful enough(
  http://lucene.apache.org/java/3_1_0/queryparsersyntax.html).
 
  Any ideas, how we could do this, and still leverage the REST API for
 index
  queries?
 
  Cheers
  ___
  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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Relationship not found error while traversing/querying (REST API)

2011-11-21 Thread Mattias Persson
I think for such a scenario you'd need read locks which gets upgraded to
write locks when modifying. Consider this simple scenario w/o read locks:

Thread ONE: get relationship R
Thread TWO: get relationship R
Thread TWO: delete relationship R and commit transaction
Thread ONE: do any modification on relationship R... BOOM Exception

If read locks were to be taken when getting relationships:

Thread ONE: get relationship R
Thread TWO: get relationship R
Thread TWO: would like to delete relationship R, but will have to wait
until Thread ONE releases its read lock on it
Thread ONE: do some modification on relationship R and commit transaction
Thread TWO: lock from Thread ONE was released so delete relationship R and
commit transaction

Unfortunately you cannot provide different isolation levels in neo4j at the
moment, but you could mimic that behavior yourself using
LockManager/LockReleaser (from graphDb.getConfig())

2011/11/21 Aseem Kishore aseem.kish...@gmail.com

 Hey guys,

 If we put our app under a bit of load, creating and removing nodes and
 relationships concurrently, sometimes we get back a 500 Internal Server
 Error from the REST API when we do a traverse or Cypher query. Here's an
 example stack trace:

 https://gist.github.com/1381423

 We're running Neo4j. 1.4 still, but does this stack trace provide any
 insight/ideas into what might be wrong, what we could do as a workaround,
 etc.? Can I provide any other info that would help?

 It goes without saying that our assumption is that Neo4j shouldn't be
 failing/crashing on queries; our expectation was that operations are
 transactional, etc.

 Thanks!

 Aseem
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Relationship not found error while traversing/querying (REST API)

2011-11-21 Thread Mattias Persson
2011/11/21 Aseem Kishore aseem.kish...@gmail.com

 One more point of clarification: these are concurrent REST API requests.
 One request is deleting a relationship, another request is querying for
 a(nother) relationship.

 A simple analogy is a user unliking one thing on Facebook then immediately
 liking something else.

 I wouldn't expect the database to throw an error in this case, right? Am I
 wrong in assuming that the requests should be serialized / handled
 gracefully? If I'm wrong, should I just be optimistically retrying failed
 requests?

 That isn't possible through pure REST a.t.m.

A retry would do the trick but feels like jut a workaround, really. It
would be nice with a way to control isolation using an http header or
similar. And no, you shouldn't need to worry about these things.

 Thanks again!

 Aseem

 On Mon, Nov 21, 2011 at 12:47 AM, Aseem Kishore aseem.kish...@gmail.com
 wrote:

  I'm definitely modifying the graph at the same time; that's why this is
  happening. But my assumption was that that shouldn't be breaking Neo4j
 -- I
  thought requests are transactional/serialized.
 
  I don't have a repro test at the moment, but the behavior is really
  simple. Here's an example analogy. We have a subgraph like User A [LIKES]
  Object 1 and also [LIKES] Object 2:
 
  (Object 1) --LIKES-- (User A) --LIKES-- (Object 2)
 
  One operation will delete the [LIKE] to Object 1, while another operation
  queries whether User A [LIKES] Object 2. The query can be a Cypher query,
  e.g.:
 
  START user=(123), obj=(456)
  MATCH (user)-[rel]-(obj)
  WHERE rel~TYPE = 'LIKES'
  RETURN rel
 
  But we've also seen this bug where we used a simple traverse (specifying
  just max depth 1 and the LIKES relationship type).
 
  When you say looks like a normal case, do you mean that the query
 should
  indeed fail like this? I wouldn't expect this -- what can I do to prevent
  an error? Should I be retrying?
 
  Thanks Peter!
 
  Aseem
 
 
  On Sun, Nov 20, 2011 at 10:08 PM, Peter Neubauer 
  peter.neuba...@neotechnology.com wrote:
 
  Aseem,
  What query are you running, and are you modifying your graph on any way
 at
  the same time? Do you have a small example test reproducing this? Looks
  like a normal case where this relationship is deleted for some reason,
 no
  failure. Maybe a better Cypher error should point that out...
 
  /peter
 
  Sent from my phone, please excuse typos and autocorrection.
  On Nov 21, 2011 3:22 AM, Aseem Kishore aseem.kish...@gmail.com
 wrote:
 
   Hey guys,
  
   If we put our app under a bit of load, creating and removing nodes and
   relationships concurrently, sometimes we get back a 500 Internal
 Server
   Error from the REST API when we do a traverse or Cypher query. Here's
 an
   example stack trace:
  
   https://gist.github.com/1381423
  
   We're running Neo4j. 1.4 still, but does this stack trace provide any
   insight/ideas into what might be wrong, what we could do as a
  workaround,
   etc.? Can I provide any other info that would help?
  
   It goes without saying that our assumption is that Neo4j shouldn't be
   failing/crashing on queries; our expectation was that operations are
   transactional, etc.
  
   Thanks!
  
   Aseem
   ___
   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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST, Gremlin and transactions (neo4django's type hierarchy)

2011-11-20 Thread Mattias Persson
you must add manually taken locks to LockReleaser to tie them to the
current transaction, otherwise thet will not be released when finishing the
transaction

Den lördagen den 19:e november 2011 skrev Matt Luongom...@scholr.ly:
 Peter,

 That plus the Gremlin docs both helped. LockManager was actually the
 difficult piece of the puzzle- even once I knew the name of the class and
 had the java docs, some things online seemed to suggest that closing a
 transaction would release read locks (not true, in my experience thus
far).

 For posterity - http://wiki.neo4j.org/content/Locks and
 http://wiki.neo4j.org/content/Transactions#Isolation were both very
helpful.

 --
 Matt Luongo
 Co-Founder, Scholr.ly



 On Sat, Nov 19, 2011 at 4:17 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

 Great Matt,
 Did you find this via


http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-an-arbitrary-groovy-script---lucene-sortingor
 should it be better documented?
 On Nov 19, 2011 9:56 PM, Matt Luongo m...@scholr.ly wrote:

  Aha! Scratched my own itch. For anyone interested...
 
  I found Gremlin's getRawGraph(), which let's me play with the
 LockManager.
 
 g.setMaxBufferSize(0)
 g.startTransaction()
 lockManager = g.getRawGraph().getConfig().getLockManager()
 
 locked = []
 curVertex = g.v(0)
 for (def typeProps : types) {
 rawVertex = curVertex.getRawVertex()
 lockManager.getReadLock(rawVertex)
 locked  rawVertex
 
 candidate = curVertex.outE('TYPE').inV.find{
 it.map.subMap(typeProps.keySet()) == typeProps
 }
 if (candidate == null) {
 newTypeNode = g.addVertex(typeProps)
 name = typeProps['app_label'] + : +
typeProps['model_name']
 newTypeNode.name = name
 g.addEdge(curVertex, newTypeNode, TYPE)
 curVertex = newTypeNode
 }
 else {
 curVertex = candidate
 }
 }
 for (def lockedRes : locked) {
 lockManager.releaseReadLock(lockedRes, null)
 }
 g.stopTransaction(TransactionalGraph.Conclusion.SUCCESS)
 
 result = curVertex
 
  Of course this puts a read lock on the reference node, which stinks,
but
  it's what the problem required.
  I'm going to memoize the result of this client-side so it only gets
 called
  a couple times.
 
  --
  Matt Luongo
  Co-Founder, Scholr.ly
 
 
 
  On Sat, Nov 19, 2011 at 2:46 AM, Matt Luongo m...@scholr.ly wrote:
 
   Guys,
  
   I'm trying to get neo4django's type hierarchy behaving in a safe way
 for
   multiprocessing. I ducked the
   REST API proper and am using the Gremlin extension, since I need the
 type
   creation operation to be atomic.
  
   The hierarchy is a simple single-inheritance system represented
 in-graph
   as a tree rooted at the reference
   node. Each node in the tree represents a type, including it's name
   (`model_name`) and the module the type
   was defined in (`app_label`).
  
   I came up with the following script
  
   g.setMaxBufferSize(0)
   g.startTransaction()
  
   cur_vertex = g.v(0)
   for (def type_props : types) {
   candidate = cur_vertex.outE('TYPE').inV.find{
   it.map.subMap(type_props.keySet()) == type_props
   }
   if (candidate == nu

-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4J for semantic graphs + algorithms

2011-11-20 Thread Mattias Persson
Den söndagen den 20:e november 2011 skrev Sébastien HARISPE
harispe.sebast...@gmail.com:
 Hello,
 Sorry for the delay in responding, I was busy these days.

 Marko
 I will test the proposed stack Thx!

 Mattias
 I work on graph based semantic similarity/proximity measures.
 In this case the graph is most of the time a reduction of an ontology i.e
a
 DAG corresponding to the rdfs:SubClassOf backbone of the specification.
 Most of proposed measures use set of ancestors/descendants and require a
 transitive reduction as preprocess...
 I just wanted to known if Neo4J proposed facilities to store temporaly
data
 during a traversal or if I have to manage them by myself.

The closest would be to begin transaction and modify the graph as you go
along to later rollback the transaction. The problem is that you would lock
those parts of the graph during that transaction. So it might be better to
manage it outside the graph if you'd like to have concurrent traversals
over the same subset of the graph

 Thanks a lot

 SH

 On Wed, Nov 16, 2011 at 9:21 AM, Mattias Persson
 matt...@neotechnology.comwrote:

 2011/11/13 Sébastien HARISPE harispe.sebast...@gmail.com

  Hi all,
 
  First of all, Thx a lot for your amazing work, simply astonishing...
  Below three questions related to my interest in using Neo4J as a Graph
DB
  on top of which I want to test algorithms dedicated to large semantic
  graphs  (OWL/RDF based).
  It would be nice if you could help me answer them.
 
 
  A -Using Neo4J with semantic web technologies like RDF/OWL/SPARQL:
 
  How does Neo4J interact with these technologies?
 
  I found/read:
 
- an old post explaining how to load OWL into Neo4J using Jena API
  [1]
 

http://sujitpal.blogspot.com/2009/05/using-neo4j-to-load-and-query-owl.html
  
.
- interesting classes in the org.neo4j.meta.model package
  [2http://components.neo4j.org/neo4j-meta-model/snapshot/
,3
 

http://components.neo4j.org/neo4j-meta-model-import/snapshot/apidocs/org/neo4j/meta/input/owl/Owl2GraphDb.html
  ]
but I can't locate the package in the 1.5 apidocs
  [4]http://components.neo4j.org/neo4j/1.5/apidocs/
.
- that the org.neo4j.rdf and org.neo4j.meta do not follow the core
components release, are they currently supported?
- a ticket related to the addition of SPARQL plugin to the Neo4J
 server,
which means that semantic processes are part of your preoccupations
;).
 
  Can you detail the position of Neo4J considering OWL/RDF/SPARQL
  technologies?
  I can't easily find documentation about Neo4J and OWL
  [5http://wiki.neo4j.org/content/OWL,_SPARQL,_SAIL,_and_RDF],
  the use of RDF and SPARQL is well detailed however
  [6]http://wiki.neo4j.org/content/RDF_/_SPARQL_Quickstart_Guide
  .
  I also read about Sail on top of Neo4j
  [7]https://github.com/datablend/neo4j-sail-test,
  and to be honest, I'm quite lost...
 
  Do you think Neo4J is an interesting solution to interact with these
  technologies, that is to say, loading OWL specification as graph
  (simplification of the spec e.g classes, instances relationships
between
  them), adding RDF triplet and using SPARQL?
 
 
 
  B - Algorithm implementations:
 
  As you know many graph algorithms need to store temporary results e.g.
  Dijkstra stores shortest path cost for all nodes during execution.
  Due to the size of the graphs, storing this information in memory is
not
  possible most of the time, so how do you manage this information?
 Temporary
  node properties? Is there guidance to implement algorithms using Neo4J?
 
  For extremely big traversal that could be a problem and the algorithms
 that come with Neo4j (Dijkstra, A*, Shortest path etc.) don't use
temporary
 properties. How big traversals are we talking about? I know I've done A*
on
 rather many millions of relationships/nodes. Most algorithms touch only a
 fraction of the full graph of course so that's usually not a problem even
 if there are a billion relationships.

 
 
  C - In-memory usage of Neo4J:
 
  In-memory graphs are very pleasant in order to perform certain CPU
  consuming algorithmic treatments on a reduced part of the graph.
  Considering an old post
  [8] http://lists.neo4j.org/pipermail/user/2010-February/002719.html

-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Scalability Roadmap

2011-11-19 Thread Mattias Persson
2011/11/18 serge s.fedoro...@gmail.com

 Are these following topics will be treated in future release (and when if
 you
 know) ?

 1/ Supernode

 I know there is a big downside in handle of super-nodes, which can be a big
 issue in a twitter-like website with, for example a user followed by more
 than 200k users (i have in head, real case) or in a recommendation system
 which have sophisticated rules.

 I would like to know if the super-node issue (as we name it) is planned
 to
 be investigated in futures releases ?

 Just to clarify. Super nodes aren't handles well in neo4j a.t.m.
Specifically what's bad about how they are handled is that to get any
relationship from a node they all have to be loaded once first into cache,
regardless of which type you requested. One solution is to be able to only
load relationships that you request so that getting, say 3 relationships of
type A from a super node with millions of relationships of types A,B,C and
D it would only need to load those 3 A relationships. If you would like to
get all relationships from such a super node they would all have to be
loaded anyway, right? And that brings me to another solution, preferably in
conjunction with the former, to have an optimized storage of such super
nodes so that relationships can be loaded serialized in bigger chunks from
disk.

When you think of super nodes (and a solution) which of these are you
thinking about first and foremost? Or something that I didn't mention here
even?


 2/ Sharding and horizontal scalability

 I guess sharding is a complex problem to handle with graph db but is it
 planned to address the horizontal scalability goal ? and that, even if it
 should bring us towards kind of inconsistensy but acceptable situation
 (for example, there are many cases of synchronization latency website can
 accept when it have a big load)

 Thanks



 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Scalability-Roadmap-tp3519034p3519034.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Scalability Roadmap

2011-11-19 Thread Mattias Persson
2011/11/19 Krzysztof Raczyński racz...@gmail.com

 On Sat, Nov 19, 2011 at 11:20 AM, Mattias Persson
 matt...@neotechnology.com wrote:
  2011/11/18 serge s.fedoro...@gmail.com
  Specifically what's bad about how they are handled is that to get any
  relationship from a node they all have to be loaded once first into
 cache,
  regardless of which type you requested.

 Does this also pertain to relationship direction? If, f.e. i request
 only inbound relationships, are outbound relationships loaded too?


Yes, sorry, relationships gets loaded per type AND direction. So if you've
got 1 incoming and 1 000 000 outgoing relationships of type A you can load
only the incoming one if you request it.

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j upcoming features importance poll

2011-11-19 Thread Mattias Persson
hat exactly does mandatory node types mean?

2011/11/19 Pablo Pareja ppar...@era7.com

 Hi all,

 I was thinking it'd be cool to create a sort of a poll in order to know
 which features (that are missing right now...) are the most important ones
 for the community. I just did a quick google search for free online poll
 creation platforms and found doodle site, (btw do you know a better site to
 do this?).
 The address for the poll is:
 http://www.doodle.com/wg8k77vwq6b654bv
 So far I just added three features that came to my mind while I was
 creating it, so please say which features you're missing and I'll add them
 so that we can all vote for them or not.
 What do you think about all this?
 Cheers,

 Pablo

 --
 Pablo Pareja Tobes

 My site http://about.me/pablopareja
 LinkedInhttp://www.linkedin.com/in/pabloparejatobes
 Twitter   http://www.twitter.com/pablopareja

 Creator of Bio4j -- http://www.bio4j.com

 http://www.ohnosequences.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Scalability Roadmap

2011-11-19 Thread Mattias Persson
I don't know if a node with a hundred relationships can be considered a
super node though. Loading a hundred relationships is pretty fast and warm
nodes (all its relationships in cache) is already fast on these things. I'm
planning on maybe switch internal store representation on a given threshold
so that nodes with a relationship count less than, say 50 or 100, have the
normal representation/function but will switch to a more optimized format
for loading beyond that, although it's more expensive on disk size and the
amount of memory you'd want to spend on memory mapping. It could be
configurable though so that the switch happens earlier.

2011/11/19 Krzysztof Raczyński racz...@gmail.com

 Great, since my schema is a tree (1 incoming, up to hundred of
 outcoming) i was worried about that.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Sampling a Neo4j instance?

2011-11-18 Thread Mattias Persson
{
db.getNodeById( nextId );
i++;
System.out.println( id  + nextId +  is there );
}
catch ( NotFoundException e )
{
// NotFoundException is thrown when the node asked
 is not in use
System.out.println( id  + nextId +  not in use
 );
}
}
db.shutdown();
}
   
Like already mentioned, this will be slow. Random jumps around the
graph are not something caches can keep up with - unless your
 whole db
fits in memory. But accessing random pieces of an on-disk file
 cannot
be done much faster.
   
cheers,
CG
   
On Wed, Nov 9, 2011 at 6:08 PM, Jim Webber j...@neotechnology.com
 wrote:
 Hi Anders,

 When you do getAllNodes, you're getting back an iterable so as
 you point out the sample isn't random (unless it was written randomly to
 disk). If you're prepared to take a scattergun approach and tolerate being
 disk-bound, then you can ask for getNodeById using a made-up ID and deal
 with the times when your ID's don't resolve.

 It'll be slow (since the chances of having the nodes in cache
 are low) but as random as your random ID generator.

 Jim
 ___
 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
  
   ___
   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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Record not in use problem and solution

2011-11-17 Thread Mattias Persson
)
   at
  
 
 org.neo4j.kernel.impl.persistence.PersistenceManager.loadNodeProperties(PersistenceManager.java:114)
   at
  
 
 org.neo4j.kernel.impl.core.NodeManager.loadProperties(NodeManager.java:675)
   at
  org.neo4j.kernel.impl.core.NodeImpl.loadProperties(NodeImpl.java:115)
   at
  
 
 org.neo4j.kernel.impl.core.Primitive.ensureFullProperties(Primitive.java:648)
   at
 org.neo4j.kernel.impl.core.Primitive.hasProperty(Primitive.java:283)
   at
 org.neo4j.kernel.impl.core.NodeProxy.hasProperty(NodeProxy.java:150)
  
   The exception was thrown when our new REST API was under heavy load.
 In
   our testcase, we deleted nodes in a while-true-loop while creating
  nodes
   in another. After some concurrent requests, the nodes were not
 cleanly
   auto-removed from the (manual) index. So some nodes were still
 returned
   by an index search, but the above exception was thrown.
  
   Before fixing, our code for removing looked like this (AbstractNode
 and
   StructrRelationship are just wrapper classes for Neo's Node and
   Relationship).
  
 [...]
 // 1: delete relationships
 if(obj instanceof AbstractNode) {
 ListStructrRelationship   rels =
  
   ((AbstractNode)obj).getRelationships();
 for(StructrRelationship rel :
 rels) {
 success= rel.delete();
 }
 }
  
 // 2: delete object
 success= obj.delete();
 [...]
  
   Removing the node from the index before deleting it resolved the
  exception.
  
 [...]
  
 // 1: remove node from index
 Services.command(securityContext,
   RemoveNodeFromIndex.class).execute(obj);
  
 // 2: delete relationships
 if(obj instanceof AbstractNode) {
 ListStructrRelationship   rels =
   ((AbstractNode)obj).getRelationships();
 for(StructrRelationship rel :
 rels) {
 success= rel.delete();
 }
 }
  
 // 3: delete object
 success= obj.delete();
 [...]
   Maybe this helps someone.
  
   Tonight, I will do a test with neo4j 1.5 and report back.
  
  
   Greetings
  
   Axel
  
   ___
   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
  
 
 
  --
  Axel Morgner
  Morgner UG
  Hanauer Landstr. 291a
  60314 Frankfurt
  Germany
 
  Phone +49 151 40522060
  Skype axel.morgner
  E-mail a...@morgner.de
  Web http://www.morgner.de
  Twitter @amorgner
 
  ___
  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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Record not in use problem and solution

2011-11-17 Thread Mattias Persson
2011/11/17 Axel Morgner a...@morgner.de

 We remove nodes from the index with index.remove(node). The index is
 initialized at startup with


It cannot be only that. By the looks of it some part of your code uses
Node#hasProperty after Node#delete, which is illegal and that's what's
causing it. Can you provide a more covering stacktrace or perhaps other
information/code ?


 IndexNode index = graphDb.index().forNodes(fulltextAllNodes,
 MapUtil.stringMap(provider, lucene, type, fulltext));

 Removing the node from the index before executing node.delete() avoids
 the exception.

 Isolating the testcase is difficult, and I don't have the time right
 now. But I can send you a database archive containing a zombie node if
 you like.


 Am 17.11.2011 10:35, schrieb Mattias Persson:
  Removing from index: is that done by looking at properties and removing
  them from the index for every property. If that's the case then this is
  expected since the node has been deleted just before.
 
  2011/11/17 Peter Neubauerpeter.neuba...@neotechnology.com
 
  Axel,
  Can you isolate this into a test, and maybe send the messages.log off
 list
  for us to look at?
  On Nov 17, 2011 12:09 AM, Axel Morgnera...@morgner.de  wrote:
 
  Sorry to say, but I can reproduce the behaviour with 1.5, too.
 
  Without deleting the node from the index manually, I get still this
  org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
 
  17.11.2011 00:01:48 org.structr.core.node.TransactionCommand execute
  WARNUNG: Transaction failure
  org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Record[46]
  not in use
   at
 
 
 org.neo4j.kernel.impl.nioneo.store.NodeStore.getRecord(NodeStore.java:215)
   at
 
 org.neo4j.kernel.impl.nioneo.store.NodeStore.getRecord(NodeStore.java:96)
   at
 
 
 
 org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.nodeDelete(WriteTransaction.java:683)
   at
 
 
 
 org.neo4j.kernel.impl.persistence.PersistenceManager.nodeDelete(PersistenceManager.java:136)
   at
  org.neo4j.kernel.impl.core.NodeManager.deleteNode(NodeManager.java:847)
   at org.neo4j.kernel.impl.core.NodeImpl.delete(NodeImpl.java:266)
   at org.neo4j.kernel.impl.core.NodeProxy.delete(NodeProxy.java:57)
   at
  org.structr.core.entity.AbstractNode.delete(AbstractNode.java:1358)
   at
 
 
 
 org.structr.rest.constraint.ResourceConstraint$2.execute(ResourceConstraint.java:153)
   at
 
 
 
 org.structr.core.node.TransactionCommand.execute(TransactionCommand.java:61)
   at
 
 
 
 org.structr.rest.constraint.ResourceConstraint.doDelete(ResourceConstraint.java:129)
   at
 
 
 org.structr.rest.servlet.JsonRestServlet.doDelete(JsonRestServlet.java:188)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at
 
 
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
   at
 
 
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at
 
 
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
   at
 
 
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
   at
 
 
 
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
   at
 
 
 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
   at
 
 
 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
   at
 
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
   at
 
 
 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at
 
 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
   at
 
 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
   at
 
 
 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
   at
 
 
 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
   at
 
 
 
 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
   at
 
 
 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at
 
 
 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:679)
 
  Interestingly, all node properties (besides id) are empty.
 
  Greetings
 
  Axel
 
  Sorry, I meant we had this with 1.4.2, but nevertheless I will
  double-check 1.5 now ..
 
 
  Am 16.11.2011 22:28, schrieb Peter Neubauer:
  Axel,
  please do, as we have found and squashed a number of potential
  problems in QA for 1.5 after 1.4.1
 
  Cheers,
 
  /peter neubauer
 
  GTalk:  neubauer.peter
  Skype   peter.neubauer
  Phone   +46 704 106975
  LinkedIn   http://www.linkedin.com

Re: [Neo4j] Record not in use problem and solution

2011-11-17 Thread Mattias Persson
Deleting a node doesn't remove it from its indexes because there's no hard
link between a node and its indexes so it would be a costly operation. It
merely hides it from IndexHits and puts it up for deletion later
(read-repair). Are you getting the exception in another thread and/or is
that node included in some other IndexHits? If that's the case then it
might be a race condition.

2011/11/17 Axel Morgner a...@morgner.de


  It cannot be only that. By the looks of it some part of your code uses
  Node#hasProperty after Node#delete, which is illegal and that's what's
  causing it.
 Yes, that's right. The exception is expected behaviour. But why the
 node's still in the index?

 I think it's just a timing problem in our code. It's happening only
 under race conditions when creating and deleting nodes with multiple
 threads. Maybe it's because after node.delete() the deleting thread
 doesn't immediately remove it from the index while another thread
 accesses the node via index lookup, and of course fails to use the node
 as it has already the notInUse flag persisted. Seems that the node is
 then kind of locked. I don't know ...

 It's a bit weird that it's so easy to bring the database into an
 inconsistant state with a node still being in the index, but our fix is
 working for us so far, and I understood what we did wrong.

 Sorry that I don't have more time to sort it out. But if you really
 think that it's worth to have a deeper look into it, I could setup a
 small webapp using the libraries we're using here (it's all available at
 Github [1]).

 [1]

 https://github.com/structr/structr/blob/develop/structr/structr-core/src/main/java/org/structr/rest/constraint/ResourceConstraint.java


 Greetings

 Axel
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4J for semantic graphs + algorithms

2011-11-16 Thread Mattias Persson
2011/11/13 Sébastien HARISPE harispe.sebast...@gmail.com

 Hi all,

 First of all, Thx a lot for your amazing work, simply astonishing...
 Below three questions related to my interest in using Neo4J as a Graph DB
 on top of which I want to test algorithms dedicated to large semantic
 graphs  (OWL/RDF based).
 It would be nice if you could help me answer them.


 A -Using Neo4J with semantic web technologies like RDF/OWL/SPARQL:

 How does Neo4J interact with these technologies?

 I found/read:

   - an old post explaining how to load OWL into Neo4J using Jena API
 [1]
 http://sujitpal.blogspot.com/2009/05/using-neo4j-to-load-and-query-owl.html
 
   .
   - interesting classes in the org.neo4j.meta.model package
 [2http://components.neo4j.org/neo4j-meta-model/snapshot/
   ,3
 http://components.neo4j.org/neo4j-meta-model-import/snapshot/apidocs/org/neo4j/meta/input/owl/Owl2GraphDb.html
 ]
   but I can't locate the package in the 1.5 apidocs
 [4]http://components.neo4j.org/neo4j/1.5/apidocs/
   .
   - that the org.neo4j.rdf and org.neo4j.meta do not follow the core
   components release, are they currently supported?
   - a ticket related to the addition of SPARQL plugin to the Neo4J server,
   which means that semantic processes are part of your preoccupations ;).

 Can you detail the position of Neo4J considering OWL/RDF/SPARQL
 technologies?
 I can't easily find documentation about Neo4J and OWL
 [5http://wiki.neo4j.org/content/OWL,_SPARQL,_SAIL,_and_RDF],
 the use of RDF and SPARQL is well detailed however
 [6]http://wiki.neo4j.org/content/RDF_/_SPARQL_Quickstart_Guide
 .
 I also read about Sail on top of Neo4j
 [7]https://github.com/datablend/neo4j-sail-test,
 and to be honest, I'm quite lost...

 Do you think Neo4J is an interesting solution to interact with these
 technologies, that is to say, loading OWL specification as graph
 (simplification of the spec e.g classes, instances relationships between
 them), adding RDF triplet and using SPARQL?



 B - Algorithm implementations:

 As you know many graph algorithms need to store temporary results e.g.
 Dijkstra stores shortest path cost for all nodes during execution.
 Due to the size of the graphs, storing this information in memory is not
 possible most of the time, so how do you manage this information? Temporary
 node properties? Is there guidance to implement algorithms using Neo4J?

 For extremely big traversal that could be a problem and the algorithms
that come with Neo4j (Dijkstra, A*, Shortest path etc.) don't use temporary
properties. How big traversals are we talking about? I know I've done A* on
rather many millions of relationships/nodes. Most algorithms touch only a
fraction of the full graph of course so that's usually not a problem even
if there are a billion relationships.



 C - In-memory usage of Neo4J:

 In-memory graphs are very pleasant in order to perform certain CPU
 consuming algorithmic treatments on a reduced part of the graph.
 Considering an old post
 [8]http://lists.neo4j.org/pipermail/user/2010-February/002719.html,
 a proposed alternative was to rollback the transaction after the treatment,
 i.e load the graph without flushing it. This make sense if you want to load
 a new graph but is it possible to load a specific part of an existing graph
 database in memory? Moreover, in the previously cited post you said that
 you planned to add an in-memory implementation but I can't find more
 information in the 1.5 doc, did I missed something?



Thx,

 SH

 [1]
 http://sujitpal.blogspot.com/2009/05/using-neo4j-to-load-and-query-owl.html
 [2] http://components.neo4j.org/neo4j-meta-model/snapshot/
 [3]

 http://components.neo4j.org/neo4j-meta-model-import/snapshot/apidocs/org/neo4j/meta/input/owl/Owl2GraphDb.html
 [4] http://components.neo4j.org/neo4j/1.5/apidocs/
 [5] http://wiki.neo4j.org/content/OWL,_SPARQL,_SAIL,_and_RDF
 [6] http://wiki.neo4j.org/content/RDF_/_SPARQL_Quickstart_Guide
 [7] https://github.com/datablend/neo4j-sail-test
 [8] http://lists.neo4j.org/pipermail/user/2010-February/002719.html
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Copy queries from the web admin console?

2011-11-16 Thread Mattias Persson
I also have problems copying from the webadmin console (when releasing the
mouse button after selecting something the selection disappears). I think
it's a real issue.

2011/11/15 Peter Neubauer peter.neuba...@neotechnology.com

 So, I am able to copy and paste - do you have a screenshot or so on what
 you are trying to do?

 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  - NOSQL for the Enterprise.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.


 On Mon, Nov 14, 2011 at 1:01 AM, yobi johnny@yobistore.com wrote:

  It's really hard for me to copy the CQL queries from the web admin
 console.
 
  Could this be a feature added?
 
  --
  View this message in context:
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Copy-queries-from-the-web-admin-console-tp3505510p3505510.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] HowTo: Dijkstra with Limited Depth

2011-11-16 Thread Mattias Persson
Try to use GraphAlgoFactory#dijkstra instead.

2011/11/14 Joel Cordeiro jkorde...@gmail.com

 Hi there,

 I'm having performance issues with Neo4J while using GraphAlgoFactory to
 find a path between two nodes. I want to calculate the cost between the two
 nodes (each relation type has a different cost), with the maximum depth of
 3 (paths with more length can be discarded). I'm using the findAllPaths
 method, since the findShorthestPath method takes into account the path
 length and not the cost associated to it. But this is not the ideal
 solution, because of the performance issues I'm having.

 I'm thinking about using something like the Dijkstra algorithm, but with a
 maximum depth of 3. I already took a look at the Neo4J source code and
 found the class *org.neo4j.graphalgo.impl.shortestpath.Dijkstra, *which I
 have tried to use with limitMaxRelationShipsToTraverse set to 3. Most of
 the times it doesn't found any path, and  throws the exception:
 java.lang.RuntimeException: Trying to decrease to a greater key
 at

 org.neo4j.graphalgo.impl.util.FibonacciHeap.decreaseKey(FibonacciHeap.java:318)
 at

 org.neo4j.graphalgo.impl.shortestpath.DijkstraPriorityQueueFibonacciImpl.decreaseValue(DijkstraPriorityQueueFibonacciImpl.java:103)
 at

 org.neo4j.graphalgo.impl.shortestpath.Dijkstra$DijstraIterator.next(Dijkstra.java:393)
 at
 org.neo4j.graphalgo.impl.shortestpath.Dijkstra.calculate(Dijkstra.java:516)

 Is this class appropriate for what I want to accomplish? I also would like
 to know if this is a good solution for the discribed problem, or if there
 is a better solution out there.

 Best regards,
 Joel Filipe Antunes Cordeiro
 jkorde...@gmail.com
 j...@student.dei.uc.pt
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Numeric index update

2011-11-15 Thread Mattias Persson
This seems to be a bug in Lucene 3.1.0 and I can confirm that it doesn't
exist in 3.4.0, so I'm hoping neo4j will update the dependency soon.

2011/11/12 Mattias Persson matt...@neotechnology.com

 It looks to be a bug. I ran the test case and while it's supposedly should
 work it doesn't... I'll try to look at it asap.


 2011/11/8 ptashcka ptash...@gmail.com

 well, as I mentioned, node may still be found by text key/value pair, but
 not
 numeric
 also - the remove is not the problem, same issue if we just add same node
 with another key/value to the index

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Numeric-index-update-tp3490124p3490221.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




 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.com




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Native UUID support?

2011-11-15 Thread Mattias Persson
When guaranteed uniqueness on index-level is supported this can probably be
implemented. Have one indirection in an index adds overhead but I image
it's only for one or more starting points and then it's internal ids all
the way from there.

2011/11/9 Michael Hunger michael.hun...@neotechnology.com

 I think a separate UUID (2xLONG = 16 Bytes) property type would make
 sense, if I remember correctly property types with larger block sizes are
 now possible.
 Otherwise it could be an inlined long[2].

 Having good support on the API  level (integrated separate fast index +
 uniqueness) would be important as well.

 That would come at the cost of dropping the exposure of native neo4j-ids.
 I think that's a worthwhile trade-off.

 Michael

 Am 09.11.2011 um 17:02 schrieb Jim Webber:

  Hey Peter,
 
  I think you raise a good point. We'll need some kind of ID for objects
 stored in (v)shards, but that's likely to be some kind of hierarchical ID
 (so that we can locally and globally refer to objects in and across shards).
 
  I think here the question boils down to: can we add (fast) support for
 UUIDs natively in our store, like we do for strings. I don't know the
 answer to that, but the kernel folks can probably offer some insight.
 
  Jim
  ___
  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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] id problem on createNode

2011-11-15 Thread Mattias Persson
Yeah, I'd love a reproducible test case for this, if such exists

2011/11/10 Peter Neubauer peter.neuba...@neotechnology.com

 Wow,
 never seen this before, do you have a full testcase to reproduce this?

 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  - NOSQL for the Enterprise.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.



 On Thu, Nov 10, 2011 at 9:18 AM, itoskov itos...@gmail.com wrote:
  I have this snippet of code while using neo4j embedded 1.4.2:
 
 Node newlyCreatedNode =  db.createNode();
 log.debug(NEWLY GENERATED NODE :  +
 newlyCreatedNode.getId());
 
 Node newlyCreatedNode1 =  db.createNode();
 log.debug(NEWLY GENERATED NODE 1:  +
 newlyCreatedNode1.getId());
 
  In most cases, this returns two different ids, but my problem is that I'm
  getting two same id values in two consecutive calls.
  For example:
  2011-11-09 19:15:07,236 DEBUG  - NEWLY GENERATED NODE : 122766
  2011-11-09 19:15:07,236 DEBUG  - NEWLY GENERATED NODE 1: 122766
 
  Can you tell me reason for this, or how to prevent this from happening
 
 
 
  --
  View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/id-problem-on-createNode-tp3496067p3496067.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Paths with null?

2011-11-14 Thread Mattias Persson
That may be a good solution, because you could not treat such a path (if it
were to have null in it somewhere) in a normal fashion anyway.

2011/11/15 Andres Taylor andres.tay...@neotechnology.com

 I just realized the obviousness of the truth.

 The optional bit is viral - it spreads out if it can. So, a path pointing
 to an optional relationship, is it self optional. Just like nodes hanging
 from an optional relationship are also optional.
 So, if the path happens to have any null parts, the whole path is null.

 Makes sense?

 Andrés

 On Sun, Nov 13, 2011 at 1:11 PM, Mattias Persson
 matt...@neotechnology.comwrote:

  A Path with null in it doesn't make much sense to me. I'd prefer b) also.
 
  Den lördagen den 12:e november 2011 skrev Andres Taylor
  andres.tay...@neotechnology.com:
   On Sat, Nov 12, 2011 at 3:02 PM, D. Frej dieter_f...@gmx.net wrote:
  
   to understand the question correctly: is it something like
   (a)-[:REL_TYPE*0..1]-(b)
  
  
   Sorry for not being clearer...
  
   No, that pattern is safe - it will never contain a null. The optional
   relationships have a question mark in them, like this:
  
(a)-[?:REL_TYPE]-(b)
  
   Andrés
   ___
   Neo4j mailing list
   User@lists.neo4j.org
   https://lists.neo4j.org/mailman/listinfo/user
  
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Paths with null?

2011-11-13 Thread Mattias Persson
A Path with null in it doesn't make much sense to me. I'd prefer b) also.

Den lördagen den 12:e november 2011 skrev Andres Taylor
andres.tay...@neotechnology.com:
 On Sat, Nov 12, 2011 at 3:02 PM, D. Frej dieter_f...@gmx.net wrote:

 to understand the question correctly: is it something like
 (a)-[:REL_TYPE*0..1]-(b)


 Sorry for not being clearer...

 No, that pattern is safe - it will never contain a null. The optional
 relationships have a question mark in them, like this:

  (a)-[?:REL_TYPE]-(b)

 Andrés
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user


-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Numeric index update

2011-11-12 Thread Mattias Persson
It looks to be a bug. I ran the test case and while it's supposedly should
work it doesn't... I'll try to look at it asap.

2011/11/8 ptashcka ptash...@gmail.com

 well, as I mentioned, node may still be found by text key/value pair, but
 not
 numeric
 also - the remove is not the problem, same issue if we just add same node
 with another key/value to the index

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Numeric-index-update-tp3490124p3490221.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Can I keep files as a Property?

2011-11-10 Thread Mattias Persson
You could store the file contents as byte array or something. While there's
no limitation on size I'd say that neo4j isn't optimized for those kinds of
data and you would get bad performance. Also doing that over REST doesn't
sound great. What's your use case?

2011/11/10 musa musa.basb...@gmail.com

 Hi

 Can I keep a file as a property in my graph?
 If so ,
 1.Is there a limitation on file size?
 2.How can I implement it using REST technology?

 muhamad.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Can-I-keep-files-as-a-Property-tp3495949p3495949.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Can't install server as a service on Amazon EC2 Linux

2011-11-10 Thread Mattias Persson
The linux service scripts aren't great in supporting multiple distros. I
hope support for amazon/redhat/centos will be available in 1.6.M01 or
similar.

2011/11/10 Aseem Kishore aseem.kish...@gmail.com

 Sorry, should have mentioned that I made sure to do sudo, and sudo works
 for other commands just fine.

 Aseem

 On Wed, Nov 9, 2011 at 11:06 PM, Aseem Kishore aseem.kish...@gmail.com
 wrote:

  I'm new to Amazon EC2. I launched a new Amazon Linux (the basic,
 default
  image) instance, installed Neo4j on it, and tried to follow the
  instructions here:
 
 
 
 http://docs.neo4j.org/chunked/stable/server-installation.html#_linux_service
 
  Unfortunately, running `neo4j install` (as well as `neo4j remove`, and
  regardless of which user I specify or whether that user already exists or
  not) always results in this error:
 
   *update-rc.d: Command not found.*
 
  I'm looking into some ways to run startup scripts on EC2, but I'm not
 sure
  what the pros/cons are to starting Neo4j manually via a script vs. as a
  formal service.
 
  But just FYI -- can't install Neo4j as a service following the official
  instructions on EC2 Amazon Linux. Help appreciated. Thanks!
 
  Aseem
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] How to stop returnable evaluator

2011-11-10 Thread Mattias Persson
ReturnableEvaluator returns the things you tell it to return when they are
encountered (not at the end of the traversal). The StopEvaluator tells the
traverser when to stop traversing a given branch. So if you for example
would write a StopEvaluator like:

   StopEvaluator
   {
  public boolean isStopNode( TraversalPosition position )
  {
 return position.depth() = 3;
  }
   }

The traverser would stop traversing branches deeper or as deep as 3, so
that all nodes at maximum depth 3 is returned. You could also look at
TraversalDescription (gotten from org.neo4j.kernel.Traversal.description())
which is a more low-level and powerful traversal API. In that you work with
paths instead of nodes and you can configure it more.

2011/11/10 Emil Dombagolla em...@hsenidoutsourcing.com

 Dear All,

 I am writing traverser as follows. i want to stop the returnable evaluator
 once my condition matching node found , rather evaluating until end of the
 graph.

 How i can ask returnable evaluator to stop the traverse and return the
 nodes.

 group.traverse(Order.BREADTH_FIRST,
StopEvaluator.END_OF_GRAPH, new
 TopicHasViewPermissionEvaluator(group,user),
RelTypes.TOPIC,Direction.OUTGOING).iterator();


 Thanks a lot
 Emil Dombagolla,
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Expected performance question

2011-11-09 Thread Mattias Persson
Also, support for these heavy nodes with many relationships on them is
being worked some on so that you can get relationship count per
type/direction immediately instead of iterating over them, as well as only
loading relevant relationships instead of all.

In the meantime it would be better to keep a property per node containing
the number of relationships, kept up to date by your code when you
create/delete relationships. You could perhaps write that as a
TransactionEventHandler (if you're down at java level).

2011/11/9 Hans Birkeland han...@funcom.com

 Thanks for the quick reply! :)

 This is the query: start n=node(159178) match n-[*1..4]-x return count(*)

 Hans

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Expected-performance-question-tp3492892p3492924.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j REST server's log files

2011-11-09 Thread Mattias Persson
You want to look at data/log/console.log and data/log/neo4j.0.log (I think
it's called).

Peter, messages.log isn't for users, it's mainly for forensics/debugging
where a neo4j dev can get info by looking at.

Neo4j is rather light on the logging in general.

Den onsdagen den 9:e november 2011 skrev Peter Neubauer
peter.neuba...@neotechnology.com:
 Andrew,
 Go you have the generating code somewhere you check and reproduce?
 On Nov 9, 2011 6:26 PM, andrew ton andrewt...@yahoo.com wrote:



 Hi Peter,

 I tried the messages.log but it only showed processes up to the time when
 the server is up

 2011-11-09 08:59:19.669-0800: --- CONFIGURATION END ---
 2011-11-09 08:59:19.733-0800: Extension
 org.neo4j.kernel.KernelExtension[kernel jmx] loaded ok
 2011-11-09 08:59:19.857-0800: Extension
 org.neo4j.kernel.KernelExtension[shell] loaded ok
 2011-11-09 08:59:19.858-0800: Extension
 org.neo4j.kernel.KernelExtension[kernel udc] loaded ok

 The manual shows that the logging is configured in
conf/logging.properties
 (java.util.logging.FileHandler.pattern=data/log/neo4j.%u.%g.log). I'm
using
 the default settings but the log file was not updated in the run time.
 My purpose is that I want to see what is wrong when I failed to store an
 ontology into Neo4J.
 Please help me out!

 Thanks and regards,



 
 From: Peter Neubauer peter.neuba...@neotechnology.com
 To: Neo4j user discussions user@lists.neo4j.org
 Sent: Wednesday, November 9, 2011 8:46 AM
 Subject: Re: [Neo4j] Neo4j REST server's log files

 Andrew,
 The database logs are in data/graphdb / messages.log
 On Nov 9, 2011 5:39 PM, andrew ton andrewt...@yahoo.com wrote:

 
 
  Hi,
 
  What log files of the Neo4J REST server can I use to check what's going
 on
  in the server? The log/console.log and neo4j.x.x.log do not show
  transactions in the run time. I also looked into graph.db/tm_tx_log.x
 but I
  did not learn anything from there. Can somebody give me some pointers?
 
  Thanks,
  ___
  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


-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Property loading in Neo4J 1.4

2011-11-07 Thread Mattias Persson
Properties on nodes/relationships are stored as a non-indexed linked list
on disk so if you're accessing one property on a node/relationship neo4j
has to load that chain (i.e. all properties, not necessarily their values
though) for that node/relationship if it hasn't already done that (i.e. if
its properties are already in cache or not).

2011/11/6 Rick Bullotta rick.bullo...@thingworx.com

 If a node is accessed, are *all* of its properties loaded into memory?

 Thanks,

 Rick

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Node Id generation deadlock

2011-11-05 Thread Mattias Persson
You'd have to go with another solution then. Is your application this
critical to write throughput or are you just thinking ahead and making sure
that it some day might need to support an amount of write throughput?

2011/11/3 Yaniv Ben Yosef yani...@gmail.com

 Hi,

 I've also been wondering about this subject.
 According to the Neo4J design guide (
 http://wiki.neo4j.org/content/Design_Guide) the factory node and id
 generator patterns are the way to implement sequential ID generation.
 However, according to this thread, it sounds like in a multi-threaded
 environment I have one of two choices:
 1. lock the factory node. However this will force transaction
 serialization. That's not practical in my app.
 2. reducing the granularity of the transactions - in the sense that each
 transaction should only contain one node creation (of the same type, i.e.
 uses the same factory node). That's not practical for me either, because in
 several cases I would like to create more than one node in the same
 transaction.
 Since the design guide recommends the factory node pattern, I'm wondering
 if there's anything I'm missing here, or that I should just avoid this
 pattern and use some other ID generation mechanism.

 Thanks,
 Yaniv


 On Thu, Nov 3, 2011 at 11:13 AM, Mattias Persson
 matt...@neotechnology.comwrote:

  2011/11/3 Cres cre...@gmail.com
 
   This solution would have been ok if I had only one node created from
 that
   factory in each transaction.
  
   It doesn't matter... after factory.setProperty is run that transaction
  has
  got a write lock on that factory node which is held until the transaction
  committs. The benefit you get from my proposal would be that you make
 sure
  you read the correct value.
 
 
   however, as shown in the sample code I posted in the original message,
 I
   have multiple nodes created in one transaction, and multiple such
   transactions in multiple threads.
   So while the creation of the actual nodes will of course be serialized,
  one
   thread's transaction will have to wait for the other thread's
 transaction
   to
   finish completely, and so if the first thread has some processing to do
   between the creation of the first and second nodes, the other third
 won't
   be
   able to create its two nodes in the meanwhile, because the first thread
   will
   have the lock on the factory node until the entire transaction
 completes.
  
   I'm looking for a way to do this having the nodes creation serialized
 but
   without having the entire transactions serialized, possibly by somehow
   releasing the lock on the factory node in mid-transaction, or by any
  other
   method.
  
   Thanks again,
   Ran.
  
   --
   View this message in context:
  
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Node-Id-generation-deadlock-tp3473118p3476498.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
  
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Exception when converting older graph

2011-11-04 Thread Mattias Persson
1.5 will (unlike 1.5.M02) be able to detect this.

2011/11/4 Romiko Derbynew romiko.derby...@readify.net

 Hi Guys,

 Is it possible to fix this in future release or not, this means in the
 event of a unclean shutdown, a regression is needed or is it possible to
 had detection if the old db was not shutdown cleanly and improve the error
 message?

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Mattias Persson
 Sent: Thursday, 27 October 2011 2:12 AM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Exception when converting older graph

 Hi,

 did you open it after a clean shutdown of the 1.4.M05 store? Because it
 will auto upgrade the store to a 1.5 format, but there's a problem of
 detecting store version in 1.5.M02 if you try to open it after a non-clean
 shutdown.

 2011/10/26 Paul A. Jackson paul.jack...@pb.com

  I have a graph that was created with 1.4.M05 that I am trying to open
  with 1.5.M02. Is this supported?
 
  I get this exception:
  Caused by: org.neo4j.graphdb.TransactionFailureException: Could not
  create data source [nioneodb], see nested exception for cause of error
 at
 
 org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:153)
 at
  org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:112)
 at
  org.neo4j.kernel.EmbeddedGraphDbImpl.init(EmbeddedGraphDbImpl.java:190)
 at
 
 org.neo4j.kernel.EmbeddedGraphDatabase.init(EmbeddedGraphDatabase.java:80)
 at
 com.g1.dcg.graph.neo4j.NeoGraph.init(NeoGraph.java:124)
 ... 42 more
  Caused by: java.lang.IllegalArgumentException
 at java.nio.Buffer.limit(Buffer.java:249)
 at
 
 org.neo4j.kernel.impl.nioneo.xa.Command.readDynamicRecord(Command.java:253)
 at
 
 org.neo4j.kernel.impl.nioneo.xa.Command$RelationshipTypeCommand.readCommand(Command.java:957)
 at
  org.neo4j.kernel.impl.nioneo.xa.Command.readCommand(Command.java:1004)
 at
 
 org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource$CommandFactory.readCommand(NeoStoreXaDataSource.java:302)
 at
 
 org.neo4j.kernel.impl.transaction.xaframework.LogIoUtils.readTxCommandEntry(LogIoUtils.java:157)
 at
 
 org.neo4j.kernel.impl.transaction.xaframework.LogIoUtils.readLogEntry(LogIoUtils.java:99)
 at
 
 org.neo4j.kernel.impl.transaction.xaframework.LogIoUtils.readEntry(LogIoUtils.java:76)
 at
 
 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.readEntry(XaLogicalLog.java:866)
 at
 
 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.doInternalRecovery(XaLogicalLog.java:796)
 at
 
 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:238)
 at
 
 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:192)
 at
 
 org.neo4j.kernel.impl.transaction.xaframework.XaContainer.openLogicalLog(XaContainer.java:97)
 at
 
 org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.init(NeoStoreXaDataSource.java:147)
 at
  sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at
 
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at
 
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at
  java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at
 
 org.neo4j.kernel.impl.transaction.XaDataSourceManager.create(XaDataSourceManager.java:75)
 at
 
 org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:147)
 ... 46 more
 
  The values in the readDynamicRecord method at the time of the call are:
  static = org.neo4j.kernel.impl.nioneo.xa.Command
  byteChannel = {org.neo4j.kernel.impl.util.BufferedFileChannel@53535}
  buffer =
  {java.nio.DirectByteBuffer@33560}java.nio.DirectByteBuffer[pos=12
  lim=12 cap=713]
  id = 1
  type = 0
  inUseFlag = 1
  inUse = true
  record = {org.neo4j.kernel.impl.nioneo.store.DynamicRecord@63952
  }DynamicRecord[1,true,isLight,-1]
  nrOfBytes = -1
  nextBlock = -4294967280
 
  Thanks.
 
  Paul Jackson, Principal Software Engineer Pitney Bowes Business
  Insight
  4200 Parliament Place | Suite 600 | Lanham, MD  20706-1844  USA
  O: 301.918.0850 | M: 703.862.0120 | www.pb.com paul.jack...@pb.com
 
  Every connection is a new opportunity(tm)
 
 
 
  Please consider the environment before printing or forwarding this email.
  If you do print this email, please recycle the paper.
 
  This email message may contain confidential, proprietary and/or
  privileged information. It is intended only for the use of the intended
 recipient(s).
  If you have received

Re: [Neo4j] Cypher-Pickle?

2011-11-04 Thread Mattias Persson
2011/11/4 maxdemarzi maxdema...@gmail.com

 I think the reason we're even having this discussion is because the cypher
 syntax is close, but not quite SQL in the first place.  This makes the
 differences between the two languages stick out in my mind.

 I haven't had a lot of time on cypher, but as a newbie to the language I
 see
 a cypher query and I'm always thinking, RETURN = SELECT, START = FROM,
 PATTERN = JOIN.  So I'm doing the translation in my head back to SQL
 anyway.

 Let's just make it as SQLish as possible to get rid of that annoying
 internal translation.

 Cypher
 -=-=-=-=-
 START lucy = node(1000)
 MATCH lucy-[:ACTS_IN]-movie-[:ACTS_IN]-co_actor
 WHERE not(movie.title = Water World)
 RETURN movie.title, count(*)
 ORDER BY count(*) DESC

 PQL
 -=-=-
 SELECT movie.title, count(*)
 FROM node(1000) as lucy
 JOIN lucy-[:ACTS_IN]-movie-[:ACTS_IN]-co_actor
 WHERE movie.title  Water World
 ORDER BY count(*) DESC

 I like JOIN instead of MATCH.  Match is The description of the pattern is
 made up of one or more paths, separated by commas. which closely resembles
 JOIN in SQL which is about describing the Relationships between tables...
 and once again I'm doing the translation in my head anyway, might as well
 eliminate that mental waste.

 Lastly, I'm not sure about the syntax for describing relationships.

 -- and -- or --- with ?: makes me think chicken scratch not language.
 Using INCOMING, OUTGOING, OPTIONAL, AS, etc might make the query verbose,
 but maybe more readable?


I'd say the strongest part of Cypher is the ascii art pattern where you
clearly see what you're querying for, right there and then without having
to parse it into a graph into your head. Removing that would reduce my
interest in this language significantly.


 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Cypher-Pickle-tp3480817p3481094.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] zero fromDepth and toDepth

2011-11-03 Thread Mattias Persson
Right, the toDepth implementation isn't matching the javadoc and it is a
bit confusing.

2011/11/3 Alex a...@auv.name

 Done:


 http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/17-consisnte-behavior-of-fromdepth-todepth-and-atdepth

 there's a typo in the title... time to get some sleep :)

 Alex

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476080.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Node Id generation deadlock

2011-11-03 Thread Mattias Persson
Even without the synchronized ( _lock ) block your transactions would be
serialized as each transaction would have to grab a lock on that factory
node. So I propose you change that method implementation to:

   private long generateId()
   {
   // This is a workaround for grabbing a write lock explicitly
   _factoryNode.removeProperty(
non-existent-property-just-for-locking );

   Long id;

   if (_factoryNode.hasProperty(idseq))
   {
   id = (Long) _factoryNode.getProperty(idseq);
   }
   else
   {
   id = 1L;
   }
   _factoryNode.setProperty(idseq, id+1);
   return id;
   }


2011/11/2 Cres cre...@gmail.com

 Hi David,

 Thank you very much for your response. I can see now what caused the
 deadlock.

 However, I'm not really sure how I can solve this problem efficiently - as
 you mentioned, your proposed solution will effectively serialize my
 transactions. Unfortunately, it'd be very difficult for me to split each
 transaction into two in the application I'm currently working on (the code
 I
 posted in the first message was just a sample code I wrote to explain the
 problem more clearly) since there are many transactions which are higher
 up
 the chain and are not really nearby the node factory, which is where I
 want
 to use your lock-grabbing technique.

 I thought about creating a nested transaction just for the update for the
 factory node's idseq property, after which I'd commit (and thereby
 release
 the RW lock I grabbed when removing the non-existing property), but I now
 realize it can't work because nested transactions aren't pure nested and
 so the lock would remain until the parent transaction commits...

 Is there any way I could possibly release the lock I have for the node
 without committing the entire transaction? And since I presume such a way
 doesn't exist, do you happen to know of any other possible solutions for my
 problem?

 Thanks again,
 Ran.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Node-Id-generation-deadlock-tp3473118p3474747.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Lucene uberfast indexing

2011-11-03 Thread Mattias Persson
Could be interesting, I'll keep an eye on when that goes into a released
Lucene version!

2011/11/1 Rick Bullotta rick.bullo...@thingworx.com

 Hi, Neo team.

 ** **

 Have you looked into the work Mike McCandless was doing with
 DocumentsWriterPerThread?  It seems at first glance to fit in nicely with
 the Neo transaction isolation model and could have a significantly positive
 effect on (already fast) performance.

 ** **


 http://www.searchworkings.org/blog/-/blogs/gimme-all-resources-you-have-i-can-use-them!/
 

 ** **

 Thoughts?

 ** **

 Rick

 ** **

 ** **




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Relationships stored order

2011-11-03 Thread Mattias Persson
2011/10/31 Dmitriy Shabanov shaban...@gmail.com

 Hi,

 Berkeley Db index looks better for that. It was updated to serve our needs,
 but better performance required.

 Mattias, do you know low storage structure? Maybe, it'll possible to use
 some structural conditions to restore relationships order. At current
 design we have two writes for one relationship, that always 2 times slow
 than one =)


Neo4j doesn't have this type of ordering on the store level, and my best
guess would be some kind of index. If the index is just used for ordering
and there's a performance problem maybe you could stack up relationships
and batch index them at a later time?


 On Mon, Oct 31, 2011 at 6:45 PM, Mattias Persson
 matt...@neotechnology.comwrote:

  You can use what you wrote and then use lucene numeric range query to do
  the trick:
 
IndexRelationship index = ...
index.add( rel2, ORDER, ValueContext.numeric(2) );
index.add( rel3, ORDER, ValueContext.numeric(3) );
index.add( rel1, ORDER, ValueContext.numeric(1) );

// For all relationships
index.query( new QueryContext( NumericRangeQuery.newIntRange(
  ORDER,null,null,true,true ) ).sortNumeric( ORDER, false ) );
// For a range
index.query( new QueryContext( NumericRangeQuery.newIntRange(
  ORDER,2,10,true,true ) ).sortNumeric( ORDER, false ) );
 

 --
 Dmitriy Shabanov
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Node Id generation deadlock

2011-11-03 Thread Mattias Persson
2011/11/3 Cres cre...@gmail.com

 This solution would have been ok if I had only one node created from that
 factory in each transaction.

 It doesn't matter... after factory.setProperty is run that transaction has
got a write lock on that factory node which is held until the transaction
committs. The benefit you get from my proposal would be that you make sure
you read the correct value.


 however, as shown in the sample code I posted in the original message, I
 have multiple nodes created in one transaction, and multiple such
 transactions in multiple threads.
 So while the creation of the actual nodes will of course be serialized, one
 thread's transaction will have to wait for the other thread's transaction
 to
 finish completely, and so if the first thread has some processing to do
 between the creation of the first and second nodes, the other third won't
 be
 able to create its two nodes in the meanwhile, because the first thread
 will
 have the lock on the factory node until the entire transaction completes.

 I'm looking for a way to do this having the nodes creation serialized but
 without having the entire transactions serialized, possibly by somehow
 releasing the lock on the factory node in mid-transaction, or by any other
 method.

 Thanks again,
 Ran.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Node-Id-generation-deadlock-tp3473118p3476498.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] zero fromDepth and toDepth

2011-11-03 Thread Mattias Persson
Sure, but implementations using it will break then. Maybe not this close to
release? hard decision.

2011/11/3 Peter Neubauer peter.neuba...@neotechnology.com

 So,
 do we fix the implementation to match (see
 https://github.com/neo4j/community/issues/80) or adjust the JavaDoc? I
 kinda think it makes sense to change the code, have written tests for
 it.

 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  - NOSQL for the Enterprise.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.



 On Thu, Nov 3, 2011 at 12:21 AM, Mattias Persson
 matt...@neotechnology.com wrote:
  Right, the toDepth implementation isn't matching the javadoc and it is a
  bit confusing.
 
  2011/11/3 Alex a...@auv.name
 
  Done:
 
 
 
 http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/17-consisnte-behavior-of-fromdepth-todepth-and-atdepth
 
  there's a typo in the title... time to get some sleep :)
 
  Alex
 
  --
  View this message in context:
 
 http://neo4j-community-discussions.438527.n3.nabble.com/zero-fromDepth-and-toDepth-tp3474825p3476080.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
 
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Comparing Lucene index lookup performance to lookup by node id

2011-11-03 Thread Mattias Persson
Indexes, while fast they are still an indirection and way slower than a
direct access of something. So this is quite expected.

2011/11/3 Tero Paananen tpp.paana...@gmail.com

 This is probably not news to anyone, but I might as well post about
 it in case new users are wondering about performance between
 index based lookups and lookups by node ids.

 I have a test database of 750,000 nodes of type A.

 The db also contains 90,000 nodes of types B and C, and roughly
 4M relationships between A-B and A-C (so two different relationship
 types). The size on disk is 4.7GB, of which the Lucene index takes
 2.3GB or so.

 Node of type A has three properties, one fulltext indexed ones and
 an id type property indexed with type exact index (type of property
 is a string). Let's call the property name as guid. The relationships and
 other types of nodes also have indexed properties, which are all indexed
 in their own indexes. There are about 14M properties in the db.

 To test the performance I generate a list of all node IDs and guid property
 values, and perform 400,000 lookups using random entries from those
 lists, and record the execution time of the 400,000 lookups.

 This is on a box with 8GB of RAM, and the performance runs are nowhere
 near using all that memory.

 I'm using SDN 2.0.0 M1 to access the data. The node id lookups are
 done with the findOne(Long id) method in the CRUDRepository class
 and the guid property lookups are done with the
 findByPropertyValue(String indexName, String property, Object value)
 method in the NamedIndexRepository class.

 Using default settings for the graph db.

 The node id lookups run in about 12,700ms

 The index based guid property id lookups run in about 123,000ms.

 So roughly a 10x performance difference.

 -TPP
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Newbie issues with indexing

2011-11-02 Thread Mattias Persson
Hi Bill,

Why BarName in one and FooName in the other? I'm assuming you have
NodeType/Name for both ok? So... a query like this would look like:

   nodeIndex.query( NodeType:Bar AND Name:\Bar 1\ );

2011/11/1 Bill Baker bill...@billbak.com

 Hello,

 I have an index and add my nodes to it as I create them.  I index two
 properties, nodeType and nodeName.  Later I want to see if a node already
 exists of a given type and a given name.  If it does, I'll use it;
 otherwise I'll create it (and index it.)  (All this is in the Java API.)

 IndexManager indexMgr = graphDB.index();
 IndexNode nodeIndex = indexMgr.forNodes(NodeType);

 Later on I create a node (newNode) with properties NodeType = Bar and
 BarName = Bar 1 and another with NodeType = Foo and FooName = Foo 1.

 nodeIndex.add (newNode, NodeType, Bar);
 nodeIndex.add (newNode, BarName, Bar 1);
 nodeIndex.add (newNode2, NodeType, Foo);
 nodeIndex.add)newNode2, FooName, Foo 1);
 etc.

 Still later, I want to see if I already have a node of type Bar with name
 Bar 1.  I read up on the query syntax in 7.7 (
 http://docs.neo4j.org/chunked/stable/indexing-search.html) and noticed
 that the syntax listed there does not support any white space in the query
 string.  So I am looking into how to use Lucene query objects to form my
 query.  But now I'm stumped.

 I want to get a list (IndexHits is fine) of any nodes in the system that
 have these two properties (NodeType and BarType) set to specific values.  I
 think there might be more to Lucene Query objects than just TermQuery.  Is
 that in the Neo4j docs, the Lucene docs?  Any examples handy?

 Thanks in advance!

 Bill


 --
 Bill Baker, Investor, Advisor, Board Member
 206-619-0928
 My other house is a data warehouse

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Newbie issues with indexing

2011-11-02 Thread Mattias Persson
2011/11/2 Bill Baker bill...@billbak.com

 Got it, quote the string so the spaces don't matter, thanks.

 NodeType:Bar AND Name:\Bar 1\ seems inconsistent.   It has five
 quotes.

 I will try this:  NodeType:Bar AND Name:\Bar 1\ as I _think_ the
 version above has unmatched quotes.

 It's how the java code looks and it's consistent, it's copy-pasted from a
passing test with your data that I wrote up for this :)


 Thanks everyone, I appreciate the help.

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Rick Bullotta
 Sent: Wednesday, November 02, 2011 8:44 AM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Newbie issues with indexing

 ...because you have a space character in the name.

 
 From: user-boun...@lists.neo4j.org [user-boun...@lists.neo4j.org] On
 Behalf Of Bill Baker [bill...@billbak.com]
 Sent: Wednesday, November 02, 2011 11:33 AM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Newbie issues with indexing

 Thanks Mattias.   One node is a Foo node and one is a Bar node.  Maybe I
 am being too fancy; I could just use 'NAME' for any type of node.

 I'm a little confused about the query string below.  Should it perhaps be
 NodeType:Bar AND Name:Bar 1 ?  I'm not getting why the property name is
 inside the quotes for one predicate and not the other (below.)

 Thanks!

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Mattias Persson
 Sent: Wednesday, November 02, 2011 3:56 AM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Newbie issues with indexing

 Hi Bill,

 Why BarName in one and FooName in the other? I'm assuming you have
 NodeType/Name for both ok? So... a query like this would look like:

   nodeIndex.query( NodeType:Bar AND Name:\Bar 1\ );

 2011/11/1 Bill Baker bill...@billbak.com

  Hello,
 
  I have an index and add my nodes to it as I create them.  I index two
  properties, nodeType and nodeName.  Later I want to see if a node
  already exists of a given type and a given name.  If it does, I'll use
  it; otherwise I'll create it (and index it.)  (All this is in the Java
  API.)
 
  IndexManager indexMgr = graphDB.index(); IndexNode nodeIndex =
  indexMgr.forNodes(NodeType);
 
  Later on I create a node (newNode) with properties NodeType = Bar
  and BarName = Bar 1 and another with NodeType = Foo and FooName =
 Foo 1.
 
  nodeIndex.add (newNode, NodeType, Bar); nodeIndex.add (newNode,
  BarName, Bar 1); nodeIndex.add (newNode2, NodeType, Foo);
  nodeIndex.add)newNode2, FooName, Foo 1); etc.
 
  Still later, I want to see if I already have a node of type Bar with
  name Bar 1.  I read up on the query syntax in 7.7 (
  http://docs.neo4j.org/chunked/stable/indexing-search.html) and noticed
  that the syntax listed there does not support any white space in the
  query string.  So I am looking into how to use Lucene query objects to
  form my query.  But now I'm stumped.
 
  I want to get a list (IndexHits is fine) of any nodes in the system
  that have these two properties (NodeType and BarType) set to specific
  values.  I think there might be more to Lucene Query objects than just
  TermQuery.  Is that in the Neo4j docs, the Lucene docs?  Any examples
 handy?
 
  Thanks in advance!
 
  Bill
 
 
  --
  Bill Baker, Investor, Advisor, Board Member
  206-619-0928
  My other house is a data warehouse
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 



 --
 Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology
 www.neotechnology.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
 ___
 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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Relationships stored order

2011-10-31 Thread Mattias Persson
You can use what you wrote and then use lucene numeric range query to do
the trick:

   IndexRelationship index = ...
   index.add( rel2, ORDER, ValueContext.numeric(2) );
   index.add( rel3, ORDER, ValueContext.numeric(3) );
   index.add( rel1, ORDER, ValueContext.numeric(1) );
   
   // For all relationships
   index.query( new QueryContext( NumericRangeQuery.newIntRange(
ORDER,null,null,true,true ) ).sortNumeric( ORDER, false ) );
   // For a range
   index.query( new QueryContext( NumericRangeQuery.newIntRange(
ORDER,2,10,true,true ) ).sortNumeric( ORDER, false ) );

2011/10/31 Evgeny Gazdovsky gazdov...@gmail.com

 PS
 We don't need a traverse through relationships
 in stored order, only iterations for start or end node.

 --
 Evgeny
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher syntax feedback wanted

2011-10-31 Thread Mattias Persson
2011/10/28 Andres Taylor andres.tay...@neotechnology.com

 Hi all!

 I'm looking to make Cypher more consistent, and so less surprising. Cypher
 today has two places where predicates are used, the WHERE clause, and for
 the ALL/ANY/NONE/SINGLE functions.

 It looks like:

 WHERE predicate
 ALL(identifier in iterable : predicate)
 etc

 Any progress on this? My first feel is that it's too program-language:y
but don't really know how to make it great.


 Now I'm thinking about adding preciates to the MATCH clause, e.g: MATCH
 a-[r? : predicate]-b
 This is only interesting for optional relationships - if the predicate is
 false, r will be null. If this predicate was in the WHERE clause, it would
 filter out the whole subgraph instead, which is very different.

 Looking at this example, the colon bothers me. It's too close to the
 relationship type. So, I'm thinking of changing it to:
 WHERE predicate
 ALL(identifier in iterable WHERE predicate)
 MATCH a-[r? WHERE predicate]-b

 What do you think?

 Andrés
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Relationships stored order

2011-10-30 Thread Mattias Persson
No, are you thinking about ordering them after property value or by type or
something else?

2011/10/30 Evgeny Gazdovsky gazdov...@gmail.com

 Hello!

 Is there way to get relationships in the stored order in the neo?

 --
 Evgeny
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] WebAdmin - incorrect data

2011-10-28 Thread Mattias Persson
Those numbers are the highest id in use minus any known deleted ids. The
problem is if there's a non-clean shutdown where deleted ids are lost and
those numbers will skew from reality. There's no easy fix for it though.

2011/10/22 sometime dons...@gmail.com

 In the database is constantly adding / deleting relationships by REST (new
 relationships put in the index).
 Sometimes I stop the database and using the java to create / delete
 relationships  (the faster than REST) and put them in the index.
 I recently created a 600k relationships, but then I realized that they are
 wrong and removed - but the webadmin's statistics are not refreshed after
 deleting.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/WebAdmin-incorrect-data-tp3443183p3443422.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [SOLVED] Traversing graph after adding node

2011-10-28 Thread Mattias Persson
You don't have to commit a transaction in order to see the changes in it.
You can add a node and a relationship and within that same transaction find
it via a traversal. And then after doing several of those commit and that's
completely fine.

2011/10/24 Rubicon dj__d...@hotmail.com

 Realized, that I've to give the hole path to the node I'm looking fore...
 have:
 [refNode]USER---[user]HAS_OCCUPATION[occupation]
 For some reason the traverser
 Traverser usersTraverser = firstNode.traverse(Order.BREADTH_FIRST,
StopEvaluator.END_OF_GRAPH,
 ReturnableEvaluator.ALL_BUT_START_NODE,
RelTypes.HAS_OCCUPATION, Direction.OUTGOING);
 wouldn't find the [occupation] node. Adding additional parameters to the
 traverser (RelTypes.USER, Direction.OUTGOING), and implementing the
 ReturnableEvaluator to return
 currentPosition.lastRelationshipTraversed().isType(RelTypes.HAS_OCCUPATION)
 have done the job.
 Don't have to commit the transaction also.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Traversing-graph-after-adding-node-tp3448023p3448255.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Batch Inserter, Node Property error

2011-10-28 Thread Mattias Persson
Thanks Christopher for the fix, it will be included in the upcoming 1.5
release

2011/10/24 Christopher Schmidt fakod...@googlemail.com

 Send a pull request (https://github.com/neo4j/community/pull/73)

 On Mon, Oct 24, 2011 at 6:38 AM, Christopher Schmidt 
 fakod...@googlemail.com wrote:

  Hi all,
 
  I am writing a Scala wrapper for the batch insertion interfaces. While
  doing so, I have the problem that properties are not written to DB.
  I wrote a little test case for Java, same error. The code below prints
 out:
 
  2 has property keys [2, 1]
  2 has property keys []
 
  Am I doing something wrong?
 
  Regards Christopher
 
  PS: Neo4j version 1.5-SNAPSHOT
 
 
 
  public class JavaMain {
  public static void main(String[] args) {
 
  String path = /tmp/temp-neo-batch-test;
 
  BatchInserter inserter = new BatchInserterImpl(path);
  BatchInserterIndexProvider provider = new
  LuceneBatchInserterIndexProvider(inserter);
  String name = users;
  BatchInserterIndex index = provider.nodeIndex(name,
  LuceneIndexImplementation.EXACT_CONFIG);
 
  GraphDatabaseService gds = inserter.getGraphDbService();
 
  Node myNode = gds.createNode();
  long id = myNode.getId();
 
  myNode.setProperty(1, one);
  myNode.setProperty(2, two);
 
  index.flush();
  System.out.println(myNode.getId() +  has property keys  +
  myNode.getPropertyKeys());
 
  provider.shutdown();
  inserter.shutdown();
 
  GraphDatabaseService db = new EmbeddedGraphDatabase(path);
  Node node1 = db.getNodeById(id);
  System.out.println(node1.getId() +  has property keys  +
  node1.getPropertyKeys());
  db.shutdown();
  }
  }
 
  --
  Christopher
  twitter: @fakod
  blog: http://blog.fakod.eu
 
 


 --
 Christopher
 twitter: @fakod
 blog: http://blog.fakod.eu
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Function to check whether two nodes are connected?

2011-10-28 Thread Mattias Persson
Just a heads up here:

if (r.getType().equals(rel.getType()))

isn't accurate. If you read the javadocs you can see that you cannot compare
RelationshipType instances, but rather their names or use the short-hand
method on Relationship:

if (r.isType(rel.getType()))

2011/10/27 Bruno Paiva Lima da Silva bplsi...@gmail.com

 Easy: just one.

 For now, I've written this, but I'm still not sure it is the simplest
 way to write it

 public boolean areConnected(Node n1,Node n2,Relationship
 rel,Direction dir) throws Exception {
 IterableRelationship relationships = n1.getRelationships(dir);

 for (Relationship r : relationships) {
 //I am only working with Dynamic Relationships
 if (r.getType().equals(rel.getType())) {
 if (dir == Direction.OUTGOING) { if
 (r.getEndNode().equals(n2)) { return true; } }
 else { if (r.getStartNode().equals(n2)) { return true; } }
 }
 }
 return false;
 }

 Bruno

 Le 27/10/2011 18:31, Peter Neubauer a écrit :
  Bruno,
  There is no such function low level, but toy can use a Shortest path algo
 to
  check this. What is the maximum length for a path between the nodes?
  On Oct 27, 2011 6:14 PM, Bruno Paiva Lima da Silvabplsi...@gmail.com
  wrote:
 
  Hello there!
  First of all, thanks for the help in all my previous questions, all the
  answers have been helping me to use Neo4j with success.
 
  I have a very simple question, but I haven't found the answer yet...
 
  I'd like to have a function, which signature would be more or less like
  this:
 
  public areTheyConnected(Node *n1*,Node *n2*,Relationship *rel*,Direction
  *dir*)
 
  which returns true iff there is an edge of type *rel*, between *n1* and
  *n2*, in the *dir* direction (the direction has n1 as reference).
 
  Example:
 
  In my graph, I have: Bob knows Tom, Tom knows Peter, Jack knows Tom
 
  areTheyConnected(nodeBob,nodeTom,relKnows,Direction.OUTGOING) returns
  true; (Bob knows Tom)
  areTheyConnected(nodeTom,nodeJack,relKnows,Direction.INCOMING) also
  returns true; (Jack knows Tom)
 
  areTheyConnected(nodeBob,nodeTom,relKnows,Direction.INCOMING) returns
  false; (Tom doesn't know Bob)
 
  Is there an easy method (constant time, or close) for that?
 
  Thank you very much,
  Bruno
  ___
  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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] 1.5M02 failed to start on reboot

2011-10-28 Thread Mattias Persson
Is this still an issue for you, or have you sent the logs to anyone?

2011/10/27 KanTube mich...@mkanner.com

 Chris,

 my servers are not in HA, i have two dev servers and one uat server all
 running the community edition with one dev server running two services at
 the same time.  the issue was on the uat server.

 i will send you the files you requested

 i deleted the data directory because i had an issue moving from 1.4 to
 1.5.01 (completely separate from this issue) and noticed that if i deleted
 the directory a new one would be generated and the server started.  so i
 gave it a try again to see if the data files were the cause this time, no
 magic here.

 thanks

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/1-5M02-failed-to-start-on-reboot-tp3455296p3458588.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST traverse deprecation

2011-10-28 Thread Mattias Persson
I think it's probably a good thing to deprecate it because:

a) it's inferior to native traversals
b) cypher and gremlin does these things much better

2011/10/28 Peter Neubauer peter.neuba...@neotechnology.com

 Hi all,
 I think that the whole concept of
 http://docs.neo4j.org/chunked/snapshot/rest-api-traverse.html is
 broken, since it tries to emulate the embedded traversal logic in
 REST, which is just broken.

 With Cypher and Gremlin being MUCH better suited to do declarative and
 scripted traversals, I think it is time to deprecate this part of the
 REST API.

 Is anyone going to be very sad if I go ahead and do that?

 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  - NOSQL for the Enterprise.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Default Analyzer in Index Framework

2011-10-26 Thread Mattias Persson
2011/10/26 Rick Bullotta rick.bullo...@thingworx.com

 Hi, Mattias.

 That's exactly what we did. One interesting note: the query and get methods
 seemed to work without lower casing the search term (maybe the analyzer is
 used to parse the query?), but for native lucene queries we needed to
 lowercase them.  All good now!  Thanks for the tips.

 You're right there, the analyzer is used both for altering added values as
well as parsing queries.


 Rick

 On Oct 25, 2011, at 7:08 PM, Mattias Persson matt...@neotechnology.com
 wrote:

  Hi Rick,
 
  yes you can do that, but not in a super easy way. What you'd have to do
  right now to get it working is to make sure you create an index with a
  special analyzer which converts everything to lower case (both additions
 and
  queries), effectively making it case insensitive. So create a class like
  this:
 
 public class LowerCaseAnalyzer extends Analyzer
 {
 @Override
 public TokenStream tokenStream( String fieldName, Reader reader )
 {
 return new LowerCaseFilter( Version.LUCENE_31, new
  KeywordTokenizer( reader ) );
 }
 }
 
  and make sure you create your index with a configuration map like:
 
 IndexNode index = graphDb.index().forNodes(
 myCaseInsensitiveIndex, MapUtil.stringMap( analyzer,
  LowerCaseAnalyzer.class.getName() ) );
 
  then this will work:
 
 index.add( node, name, Rick Bullotta );
 index.query( name:\rick bullotta\ ); // == returns that node.
 
  2011/10/25 Rick Bullotta rick.bullo...@thingworx.com
 
  Anyone able to provide some insights on this?
 
  Thanks.
  
  From: user-boun...@lists.neo4j.org [user-boun...@lists.neo4j.org] On
  Behalf Of Rick Bullotta [rick.bullo...@thingworx.com]
  Sent: Monday, October 24, 2011 6:16 PM
  To: Neo4j user discussions
  Subject: [Neo4j] Default Analyzer in Index Framework
 
  When not using fulltext indexing, what Lucene Analyzer class does Neo4J
  use?  It seems that non-fulltext index searches are case sensitive -
 we'd
  like to change that behavior.
 
  Thanks for any help/guidance/examples!
 
  Rick
 
  ___
  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
 
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Why doInternalRecovery is necessary?

2011-10-26 Thread Mattias Persson
Good question,

so neo4j implements all the ACID principles of transactions, but that
doesn't mean that there's a guarantee that when you've committed a
transaction the data is in the store files on disk. In fact that wouldn't be
performant at all. The data is written to the store files with buffering or
memory mapping depending on environment so when it actually trickles down to
actual disk is up to when neo4j decides to unmap that area of the store
file and when the OS decides to flush its buffers. Instead the only place
your transaction is guaranteed to exist on disk after a commit is in the
logical log, so for a clean shutdown all the buffers/memory mapped areas of
the store files are closed and forced to disk whereas a non-clean shutdown
(a crash or whatever) wouldn't do that and there would be no guarantee that
all the store file changes would be written. So in case of a non-clean
shutdown neo4j must look in the most recently active logical log and replay
all those transactions to the store files... and that's what the recovery
process does after a non-clean shutdown.

Best,
Mattias

2011/10/26 Balazs E. Pataki pat...@dsd.sztaki.hu

 Hi,

 after crashing my application the next time I start it up I get the usual

 Oct 26, 2011 3:28:42 PM
 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog
 doInternalRecovery
 INFO: Non clean shutdown detected on log [/db/nioneo_logical.log.1].
 Recovery started ...
 INFO: Non clean shutdown detected on log [/db/index/lucene.log.1].
 Recovery started ...

 kind of messages.

 I have a 8GB database and now this recovery has been running for quite
 some time, and I started to thinking why is this recovery is necessary
 at all? AS far as I'm aware the transactions are ACID, so they either
 commit, or rollback, in both case the state of the database must be OK.
 In this case I could see no reason why to do any recovery (from
 transactional point of view). If the DB crash happens while transactions
 are open, then there coudl be some problems. But in my case I could live
 with loosing such transactions and just not have recovery at all.

 To sum up my question: is this doInternalRecovery process essential? And
 if not, is there a way to avoid it at startup?

 Thanks,
 ---
 balazs

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Exception when converting older graph

2011-10-26 Thread Mattias Persson
Hi,

did you open it after a clean shutdown of the 1.4.M05 store? Because it will
auto upgrade the store to a 1.5 format, but there's a problem of detecting
store version in 1.5.M02 if you try to open it after a non-clean shutdown.

2011/10/26 Paul A. Jackson paul.jack...@pb.com

 I have a graph that was created with 1.4.M05 that I am trying to open with
 1.5.M02. Is this supported?

 I get this exception:
 Caused by: org.neo4j.graphdb.TransactionFailureException: Could not create
 data source [nioneodb], see nested exception for cause of error
at
 org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:153)
at
 org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:112)
at
 org.neo4j.kernel.EmbeddedGraphDbImpl.init(EmbeddedGraphDbImpl.java:190)
at
 org.neo4j.kernel.EmbeddedGraphDatabase.init(EmbeddedGraphDatabase.java:80)
at com.g1.dcg.graph.neo4j.NeoGraph.init(NeoGraph.java:124)
... 42 more
 Caused by: java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:249)
at
 org.neo4j.kernel.impl.nioneo.xa.Command.readDynamicRecord(Command.java:253)
at
 org.neo4j.kernel.impl.nioneo.xa.Command$RelationshipTypeCommand.readCommand(Command.java:957)
at
 org.neo4j.kernel.impl.nioneo.xa.Command.readCommand(Command.java:1004)
at
 org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource$CommandFactory.readCommand(NeoStoreXaDataSource.java:302)
at
 org.neo4j.kernel.impl.transaction.xaframework.LogIoUtils.readTxCommandEntry(LogIoUtils.java:157)
at
 org.neo4j.kernel.impl.transaction.xaframework.LogIoUtils.readLogEntry(LogIoUtils.java:99)
at
 org.neo4j.kernel.impl.transaction.xaframework.LogIoUtils.readEntry(LogIoUtils.java:76)
at
 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.readEntry(XaLogicalLog.java:866)
at
 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.doInternalRecovery(XaLogicalLog.java:796)
at
 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:238)
at
 org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:192)
at
 org.neo4j.kernel.impl.transaction.xaframework.XaContainer.openLogicalLog(XaContainer.java:97)
at
 org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.init(NeoStoreXaDataSource.java:147)
at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at
 java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
 org.neo4j.kernel.impl.transaction.XaDataSourceManager.create(XaDataSourceManager.java:75)
at
 org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:147)
... 46 more

 The values in the readDynamicRecord method at the time of the call are:
 static = org.neo4j.kernel.impl.nioneo.xa.Command
 byteChannel = {org.neo4j.kernel.impl.util.BufferedFileChannel@53535}
 buffer = {java.nio.DirectByteBuffer@33560}java.nio.DirectByteBuffer[pos=12
 lim=12 cap=713]
 id = 1
 type = 0
 inUseFlag = 1
 inUse = true
 record = {org.neo4j.kernel.impl.nioneo.store.DynamicRecord@63952
 }DynamicRecord[1,true,isLight,-1]
 nrOfBytes = -1
 nextBlock = -4294967280

 Thanks.

 Paul Jackson, Principal Software Engineer
 Pitney Bowes Business Insight
 4200 Parliament Place | Suite 600 | Lanham, MD  20706-1844  USA
 O: 301.918.0850 | M: 703.862.0120 | www.pb.com
 paul.jack...@pb.com

 Every connection is a new opportunity(tm)



 Please consider the environment before printing or forwarding this email.
 If you do print this email, please recycle the paper.

 This email message may contain confidential, proprietary and/or privileged
 information. It is intended only for the use of the intended recipient(s).
 If you have received it in error, please immediately advise the sender by
 reply email and then delete this email message. Any disclosure, copying,
 distribution or use of the information contained in this email message to or
 by anyone other than the intended recipient is strictly prohibited. Any
 views expressed in this message are those of the individual sender, except
 where the sender specifically states them to be the views of the Company.

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list

Re: [Neo4j] Db connections as we do in mysql ,oracle etc..

2011-10-26 Thread Mattias Persson
Have you tried the data visualizer in webadmin (http://localhost:7474)?
There you can browse the graph visually.

2011/10/26 noppanit noppani...@gmail.com

 I think you cannot have multiple connections to neo right now, but you can
 use read-only mode in neoeclipse to see the graph while you're using write
 mode in your application in the same time.
 Sent from my BlackBerry® wireless device

 -Original Message-
 From: Emil Dombagolla [via Neo4j Community Discussions] 
 ml-node+s438527n345422...@n3.nabble.com
 Date: Wed, 26 Oct 2011 04:34:29
 To: noppanitnoppani...@gmail.com
 Subject: [Neo4j] Db connections as we do in mysql ,oracle etc..



 Hi All.

 We are doing application with Neo4j for the fist time.

 Can we connect to the database server with having multiple connections same
 time. Do we have connection strings as we have in mysql,orcale etc..

 I want to see the graph changes using neoclipse while  we do our
 developements.

 Is this possible , can you give me sample connection string and how to
 access with spring.

 Please help me on this.

 Thanks
 Emil Dombagolla,
 ___
 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-Db-connections-as-we-do-in-mysql-oracle-etc-tp3454224p3454224.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-Db-connections-as-we-do-in-mysql-oracle-etc-tp3454224p3454251.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Db connections as we do in mysql ,oracle etc..

2011-10-26 Thread Mattias Persson
2011/10/26 Bill Baker bill...@billbak.com

 This might be RTFM, but I am unclear on the APIs to perform three
 semantics.

 I've been creating embedded databases with something like:

 GraphDatabaseService graphDb = new EmbeddedGraphDatabase( var/graphDb );

 How do I instead access an existing database?  Doing the above gives me an
 error if the database already exists.  Related, how would I know if a
 database already exists (other than trapping the exception or looking in the
 file system?)

I think the error you get is that it's in use by another process, not that
it already exists.

The most common way would via the RESTful API, see
http://components.neo4j.org/neo4j-server/milestone/rest.html but you can
also reach it via the neo4j-shell.


 And do I delete simply by using the OS (from command line or code) to
 delete the directory structure?


Sure, to delete the whole database you can delete that folder.


 Thanks as always.

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Mattias Persson
 Sent: Wednesday, October 26, 2011 8:15 AM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Db connections as we do in mysql ,oracle etc..

 Have you tried the data visualizer in webadmin (http://localhost:7474)?
 There you can browse the graph visually.

 2011/10/26 noppanit noppani...@gmail.com

  I think you cannot have multiple connections to neo right now, but you
  can use read-only mode in neoeclipse to see the graph while you're
  using write mode in your application in the same time.
  Sent from my BlackBerry® wireless device
 
  -Original Message-
  From: Emil Dombagolla [via Neo4j Community Discussions] 
  ml-node+s438527n345422...@n3.nabble.com
  Date: Wed, 26 Oct 2011 04:34:29
  To: noppanitnoppani...@gmail.com
  Subject: [Neo4j] Db connections as we do in mysql ,oracle etc..
 
 
 
  Hi All.
 
  We are doing application with Neo4j for the fist time.
 
  Can we connect to the database server with having multiple connections
  same time. Do we have connection strings as we have in mysql,orcale etc..
 
  I want to see the graph changes using neoclipse while  we do our
  developements.
 
  Is this possible , can you give me sample connection string and how to
  access with spring.
 
  Please help me on this.
 
  Thanks
  Emil Dombagolla,
  ___
  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-Db-conne
  ctions-as-we-do-in-mysql-oracle-etc-tp3454224p3454224.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/NamlS
  ervlet.jtp?macro=unsubscribe_by_codenode=438527code=bm9wcGFuaXQuY0Bn
  bWFpbC5jb218NDM4NTI3fDExOTIzNzAyNjk=
 
 
  --
  View this message in context:
  http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Db-conne
  ctions-as-we-do-in-mysql-oracle-etc-tp3454224p3454251.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
 



 --
 Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology
 www.neotechnology.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Urgent: 1.4.2 Github tag does not seem to match the 1.4.2 distro JAR

2011-10-25 Thread Mattias Persson
Odd, could you just give a sample of a line that is wrong? just to help me
get started looking at this

2011/10/25 Rick Bullotta rick.bullo...@thingworx.com

 When attempting to debug an issue with the index framework, the debugger is
 clearly on the wrong source lines, so I suspect there's some type of
 mismatch.

 Thoughts?

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException with BatchInserter in 1.5.M02

2011-10-25 Thread Mattias Persson
Yes this have been fixed, sorry for not notifying you about it!

The fix will be included in the 1.5 GA release. Thank you very much for you
patience and responses.

Best,
Mattias

2011/10/25 Dennis Hendriksen dennis.hendrik...@kalooga.com

 Hello Mattias,

 I'm curious to know if you were able to reproduce the problem. I realize
 that it must be quiet a pain to do so because of the huge amounts of
 data ;-)

 Greetings,
 Dennis

 On Mon, 2011-10-17 at 10:26 +0200, Mattias Persson wrote:
  Sorry, false alarm... I got them after some retries.
 
  2011/10/17 Mattias Persson matt...@neotechnology.com
  And if you could send the source it would be great (or if it's
  packaged in the jar file, which it might be but I cannot see
  it since I cannot open the jar file).
 
 
 
  2011/10/17 Mattias Persson matt...@neotechnology.com
  Thanks, but unfortunately I cannot open any of these
  files. I get unexpected EOF and such.
 
 
 
  2011/10/17 Dennis Hendriksen
  dennis.hendrik...@kalooga.com
  Hello Mattias,
 
  Download and extract the following ( 7.0GB)
  resource:
 
 http://download.wikimedia.org/enwiki/20110803/enwiki-20110803-pages-articles.xml.bz2
 
  Download the runnable jar and source files:
  http://download.kalooga.com/wikiparser.jar
 
 http://download.kalooga.com/kalooga-wikiparser.tar.gz (eclipse)
 
  Run the application as follows:
  java -Xmx9g -jar wikiparser.jar
  path/enwiki-20110803-pages-articles.xml
  path/graphdb
 
  You might want to add some additional jvm
  flags to speed up execution:
  -XX:+DoEscapeAnalysis -XX:+AggressiveOpts -XX:
  +UseNUMA -XX:
  +UseCompressedStrings -XX:
  +OptimizeStringConcat -XX:
  +UseFastAccessorMethods -XX:+UseBiasedLocking
 
  Thank you for taking the time to look into the
  problem!
 
  Greetings,
  Dennis
 
 
  On Sat, 2011-10-15 at 17:08 +0200, Mattias
  Persson wrote:
   Thanks Dennis for reporting it.
  
   I would like to run your code to be able to
  reproduce it locally, then I can
   probably fix the bug. Would that be
  possible?
  
   Best,
   Mattias
  
   2011/10/14 Dennis Hendriksen
  dennis.hendrik...@kalooga.com
  
Hi all,
   
Since upgrading neo4j 1.4.1 to 1.5.M02 I
  get a InvalidRecordException
while importing data in a new store using
  BatchInserter (never seen this
exception with 1.4.1).
   
For identical program executions the
  exceptions occur at different
moments. The problem only occurs after
  inserting millions of
nodes/relations, but occurs in each run.
  The data is inserted in a
single thread. Properties are not
  necessarily added to a node right
after node creation.
   
I've included configuration details below,
  including the exception
output during three identical runs.
   
Is this a known issue in 1.5.M02? Anyone
  encountered the same exception?
Any suggestions how to tackle this
  problem?
   
Greetings,
Dennis
   
*** java
java version 1.6.0_27
Java(TM) SE Runtime Environment (build
  1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build
  20.2-b06, mixed mode)
   
java -Xmx9g (not using any additional

Re: [Neo4j] Urgent: 1.4.2 Github tag does not seem to match the 1.4.2 distro JAR

2011-10-25 Thread Mattias Persson
Ok, phew. Got a little scared there :)

2011/10/26 Rick Bullotta rick.bullo...@thingworx.com

 Sorry for not reporting back. It was an eclipse issue. All good now!

 On Oct 25, 2011, at 7:21 PM, Mattias Persson matt...@neotechnology.com
 wrote:

  Odd, could you just give a sample of a line that is wrong? just to help
 me
  get started looking at this
 
  2011/10/25 Rick Bullotta rick.bullo...@thingworx.com
 
  When attempting to debug an issue with the index framework, the debugger
 is
  clearly on the wrong source lines, so I suspect there's some type of
  mismatch.
 
  Thoughts?
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Graph Data Corruption?

2011-10-18 Thread Mattias Persson
Could you send me (directly, matt...@neotechnology.com) your
db-dir/messages.log ? (it contains no sensitive information, just
forensics logging)

2011/10/18 John Howard johnyho...@gmail.com

 We use Linux platform and am not sure about the file system, I guess it's
 the regular one!

 On Mon, Oct 17, 2011 at 3:26 AM, Mattias Persson
 matt...@neotechnology.comwrote:

  Thanks John, on what platform and file system do you run this?
 
  2011/10/17 Tatham Oddie tat...@oddie.com.au
 
   As a sidenote, relationships are traversed in either direction with
 equal
   performance. Having reciprocal relationships is unnecessary. (Unless
 you
  can
   have person A support server B *without* server B being supported by
  person
   A ... but that just sounds broken.)
  
   I agree, server X supported by person Y can (and should) be inferred
  from
  person Y supports server X. It's more expensive to have duplicated
  relationships.
 
 
  
   -- Tatham
  
  
   -Original Message-
   From: user-boun...@lists.neo4j.org [mailto:
 user-boun...@lists.neo4j.org]
   On Behalf Of John Howard
   Sent: Sunday, 16 October 2011 12:00 PM
   To: Neo4j user discussions
   Subject: Re: [Neo4j] Graph Data Corruption?
  
   Thanks Mattias for the response.
   Yes, these nodes are consistently getting the same exceptions.
 Initially
  I
   thought shutting down the graph gracefully and starting it would solve
  the
   issue, but it didn't. We inserted node/relationships/properties with
 the
   regular create operations and NOT using the BatchInserter. Our dataset
  has
   6
   domains, one of them is People which has relationships to all other
   domains.
   Each node and relationships have about 8-12 properties.
  
   Our typical graph looks something like this:
  
   Person1 (node1) ---Supports(Rel1)--Server1(node2)
  ---Supported By(Rel2) --
  
  
  
   On Sat, Oct 15, 2011 at 11:05 AM, Mattias Persson 
   matt...@neotechnology.com
wrote:
  
Hi John,
   
So it seems to be related to loading of node/relationship properties.
  Are
those nodes/relationships consistently getting this exception or do
 you
   see
this randomly during brief moments throughout the graph? Would it
 also
  be
possible to have a look at your dataset somehow?
   
2011/10/14 John Howard johnyho...@gmail.com
   
 Hello,

 We have started getting some strange exceptions(stack trace below)
   while
 accessing node relationships.
 It happened on a node's relationship and we deleted that
 relationship
   and
 related node, so we were able to access the node and all its
relationships.
 Then it started happening to some other nodes and their
  relationships.
And
 we do not know how many node relationships are corrupted in the
  graph.
 We are using 1.4.1 version. We have around 50k nodes and 100k
 relationships.

 Appreciate your help.


 org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Not in
  use,
 blockId[1977868]

at


   
  
 
 org.neo4j.kernel.impl.nioneo.store.AbstractDynamicStore.getRecord(AbstractDynamicStore.java:472)

at


   
  
 
 org.neo4j.kernel.impl.nioneo.store.AbstractDynamicStore.getLightRecords(AbstractDynamicStore.java:429)

at


   
  
 
 org.neo4j.kernel.impl.nioneo.store.PropertyStore.getRecord(PropertyStore.java:374)

at


   
  
 
 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.loadPropertyValue(ReadTransaction.java:208)

at


   
  
 
 org.neo4j.kernel.impl.persistence.PersistenceManager.loadPropertyValue(PersistenceManager.java:87)

at


   
  
 
 org.neo4j.kernel.impl.core.NodeManager.loadPropertyValue(NodeManager.java:593)

at

  
 org.neo4j.kernel.impl.core.Primitive.getPropertyValue(Primitive.java:543)

at

 org.neo4j.kernel.impl.core.Primitive.getProperty(Primitive.java:159)

at


   
  
 
 org.neo4j.kernel.impl.core.RelationshipProxy.getProperty(RelationshipProxy.java:90)
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

   
   
   
--
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.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
   ___
   Neo4j mailing list
   User@lists.neo4j.org
   https://lists.neo4j.org/mailman/listinfo/user
  
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo

Re: [Neo4j] Graph Data Corruption?

2011-10-17 Thread Mattias Persson
Thanks John, on what platform and file system do you run this?

2011/10/17 Tatham Oddie tat...@oddie.com.au

 As a sidenote, relationships are traversed in either direction with equal
 performance. Having reciprocal relationships is unnecessary. (Unless you can
 have person A support server B *without* server B being supported by person
 A ... but that just sounds broken.)

 I agree, server X supported by person Y can (and should) be inferred from
person Y supports server X. It's more expensive to have duplicated
relationships.



 -- Tatham


 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of John Howard
 Sent: Sunday, 16 October 2011 12:00 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Graph Data Corruption?

 Thanks Mattias for the response.
 Yes, these nodes are consistently getting the same exceptions. Initially I
 thought shutting down the graph gracefully and starting it would solve the
 issue, but it didn't. We inserted node/relationships/properties with the
 regular create operations and NOT using the BatchInserter. Our dataset has
 6
 domains, one of them is People which has relationships to all other
 domains.
 Each node and relationships have about 8-12 properties.

 Our typical graph looks something like this:

 Person1 (node1) ---Supports(Rel1)--Server1(node2)
---Supported By(Rel2) --



 On Sat, Oct 15, 2011 at 11:05 AM, Mattias Persson 
 matt...@neotechnology.com
  wrote:

  Hi John,
 
  So it seems to be related to loading of node/relationship properties. Are
  those nodes/relationships consistently getting this exception or do you
 see
  this randomly during brief moments throughout the graph? Would it also be
  possible to have a look at your dataset somehow?
 
  2011/10/14 John Howard johnyho...@gmail.com
 
   Hello,
  
   We have started getting some strange exceptions(stack trace below)
 while
   accessing node relationships.
   It happened on a node's relationship and we deleted that relationship
 and
   related node, so we were able to access the node and all its
  relationships.
   Then it started happening to some other nodes and their relationships.
  And
   we do not know how many node relationships are corrupted in the graph.
   We are using 1.4.1 version. We have around 50k nodes and 100k
   relationships.
  
   Appreciate your help.
  
  
   org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Not in use,
   blockId[1977868]
  
  at
  
  
 
 org.neo4j.kernel.impl.nioneo.store.AbstractDynamicStore.getRecord(AbstractDynamicStore.java:472)
  
  at
  
  
 
 org.neo4j.kernel.impl.nioneo.store.AbstractDynamicStore.getLightRecords(AbstractDynamicStore.java:429)
  
  at
  
  
 
 org.neo4j.kernel.impl.nioneo.store.PropertyStore.getRecord(PropertyStore.java:374)
  
  at
  
  
 
 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.loadPropertyValue(ReadTransaction.java:208)
  
  at
  
  
 
 org.neo4j.kernel.impl.persistence.PersistenceManager.loadPropertyValue(PersistenceManager.java:87)
  
  at
  
  
 
 org.neo4j.kernel.impl.core.NodeManager.loadPropertyValue(NodeManager.java:593)
  
  at
  
 org.neo4j.kernel.impl.core.Primitive.getPropertyValue(Primitive.java:543)
  
  at
   org.neo4j.kernel.impl.core.Primitive.getProperty(Primitive.java:159)
  
  at
  
  
 
 org.neo4j.kernel.impl.core.RelationshipProxy.getProperty(RelationshipProxy.java:90)
   ___
   Neo4j mailing list
   User@lists.neo4j.org
   https://lists.neo4j.org/mailman/listinfo/user
  
 
 
 
  --
  Mattias Persson, [matt...@neotechnology.com]
  Hacker, Neo Technology
  www.neotechnology.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
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] WebAdmin visualization tool for large DB ?

2011-10-17 Thread Mattias Persson
Hi Pablo,

I don't think if there are any hard limits in the webadmin visualizer, It
mostly depends on your computer and browser (what with the implementation of
web workers and all) I'd say.

2011/10/13 Pablo Pareja ppar...@era7.com

 Hi,

 I was looking for a way to visualize and interact with small subsets of
 large Neo4j databases, *(somehow*
 *navigating through the data in order to have a general idea of how things
 are organized at specific parts*
 *of my DB)*.
 So before starting to create my own solution to that, I'd like to know
 which
 are the limits/constraints of the new
 WebAdmin tool ?* (in terms of number of rels/nodes in the neighborhood/
 total DB)*
 Thanks,

 Pablo

 --
 Pablo Pareja Tobes

 My site http://about.me/pablopareja
 LinkedInhttp://www.linkedin.com/in/pabloparejatobes
 Twitter   http://www.twitter.com/pablopareja

 Creator of Bio4j -- http://www.bio4j.com

 http://www.ohnosequences.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Graph Data Corruption?

2011-10-15 Thread Mattias Persson
Hi John,

So it seems to be related to loading of node/relationship properties. Are
those nodes/relationships consistently getting this exception or do you see
this randomly during brief moments throughout the graph? Would it also be
possible to have a look at your dataset somehow?

2011/10/14 John Howard johnyho...@gmail.com

 Hello,

 We have started getting some strange exceptions(stack trace below) while
 accessing node relationships.
 It happened on a node's relationship and we deleted that relationship and
 related node, so we were able to access the node and all its relationships.
 Then it started happening to some other nodes and their relationships. And
 we do not know how many node relationships are corrupted in the graph.
 We are using 1.4.1 version. We have around 50k nodes and 100k
 relationships.

 Appreciate your help.


 org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Not in use,
 blockId[1977868]

at

 org.neo4j.kernel.impl.nioneo.store.AbstractDynamicStore.getRecord(AbstractDynamicStore.java:472)

at

 org.neo4j.kernel.impl.nioneo.store.AbstractDynamicStore.getLightRecords(AbstractDynamicStore.java:429)

at

 org.neo4j.kernel.impl.nioneo.store.PropertyStore.getRecord(PropertyStore.java:374)

at

 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.loadPropertyValue(ReadTransaction.java:208)

at

 org.neo4j.kernel.impl.persistence.PersistenceManager.loadPropertyValue(PersistenceManager.java:87)

at

 org.neo4j.kernel.impl.core.NodeManager.loadPropertyValue(NodeManager.java:593)

at
 org.neo4j.kernel.impl.core.Primitive.getPropertyValue(Primitive.java:543)

at
 org.neo4j.kernel.impl.core.Primitive.getProperty(Primitive.java:159)

at

 org.neo4j.kernel.impl.core.RelationshipProxy.getProperty(RelationshipProxy.java:90)
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] How to build neo4j projects from GitHub

2011-10-14 Thread Mattias Persson
Do build the latest snapshot of neo4j you just need to add m2.neo4j.org to
your repository list (it's mostly for getting the parent pom). Here it is:

http://dist.neo4j.org/settings.xml

store that as your ~/.m2/settings.xml and it will just work.

2011/10/14 Brendan cheng ccp...@hotmail.com


 Hi,
 I was trying to clone Neo4j enterprise from Github to a local directory and
 import it to Eclipse.There were so many artifacts missing, parent path not
 found...etc.
 is there any way to solve the problems?
 Brendan
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] trying to delete all reletionships but only got some

2011-10-08 Thread Mattias Persson
I believe you've found a bug in the per-node relationship cache when
deleting relationships in the same iteration session as the lazy loading
(grab size 100) of those relationships, and at the same time doing commits
now and then in the middle of the iteration. At first sight it may be
non-trivial to fix though. I've created a ticket for it:
https://github.com/neo4j/community/issues/52 which points to a reduced
version of your test case. Thank you for reporting it.

Best,
Mattias

2011/10/6 st.pa st...@web.de


 community 1.4.1. embedded


 Am 05.10.2011 15:54, schrieb Mattias Persson:
  Hi,
 
  which version of neo4j were you running this with?
 
  2011/10/5 st.past...@web.de
 
 
  Hi.
 
  I tried to delete several million relationships of certain types from
 the
  reference node of an embedded graphdb, where there were several other
  relationshiptypes that were not to be affected. The Javadoc of
  Node#getRelationships(**RelationshipType...) says that it returns all
  relationships of the given type(s), so I expected that after one call
 I'd
  really get all. That was not the case. In my test-production-db i needed
  about 8 iterations, haven't recreated that in the test yet. But the test
  shows that not returning all desired relationships doesn't seem to
 depend on
  the total number of relationships as i thought in the beginning, if one
 runs
  the test with different numbers for insertions.
 
  Here's the log:
 
  05.10.2011 13:36:16 test01 - create graph
  05.10.2011 13:36:16 try to delete c:/_src/neo4j-test-remove-**
  relationships
  05.10.2011 13:36:16 done deleting
  05.10.2011 13:36:16 create graph db at c:/_src/neo4j-test-remove-**
  relationships
  05.10.2011 13:36:22 retrieve root node and add another node
  05.10.2011 13:36:22 prepare to cycle through relTypes
  05.10.2011 13:36:22 loop to insert relationships by cycling through
  relTypes
  05.10.2011 13:36:22 0 of 2097152 relationships inserted
  05.10.2011 13:36:26 131072 of 2097152 relationships inserted
  05.10.2011 13:36:28 262144 of 2097152 relationships inserted
  05.10.2011 13:36:33 393216 of 2097152 relationships inserted
  05.10.2011 13:36:35 524288 of 2097152 relationships inserted
  05.10.2011 13:36:40 655360 of 2097152 relationships inserted
  05.10.2011 13:36:43 786432 of 2097152 relationships inserted
  05.10.2011 13:36:48 917504 of 2097152 relationships inserted
  05.10.2011 13:36:53 1048576 of 2097152 relationships inserted
  05.10.2011 13:36:58 1179648 of 2097152 relationships inserted
  05.10.2011 13:37:02 1310720 of 2097152 relationships inserted
  05.10.2011 13:37:08 1441792 of 2097152 relationships inserted
  05.10.2011 13:37:12 1572864 of 2097152 relationships inserted
  05.10.2011 13:37:20 1703936 of 2097152 relationships inserted
  05.10.2011 13:37:25 1835008 of 2097152 relationships inserted
  05.10.2011 13:37:33 1966080 of 2097152 relationships inserted
  05.10.2011 13:37:37 2097152 of 2097152 relationships inserted
  05.10.2011 13:37:37 finished inserting 2097152 relationships
  05.10.2011 13:37:37 second part of test: deleting relationships
  05.10.2011 13:37:37 get all relationships of the given type
  05.10.2011 13:37:37 delete them all
  05.10.2011 13:38:21 131072 relationships deleted
  05.10.2011 13:38:39 262144 relationships deleted
  05.10.2011 13:38:41 262153 relationships deleted in iteration 1
  05.10.2011 13:38:41 get all relationships of the given type
  05.10.2011 13:38:41 delete them all
  05.10.2011 13:39:12 131072 relationships deleted
  05.10.2011 13:39:22 262135 relationships deleted in iteration 2
  05.10.2011 13:39:22 get all relationships of the given type
  05.10.2011 13:39:22 delete them all
  05.10.2011 13:39:22 0 relationships deleted in iteration 3
  05.10.2011 13:39:22 could expect that one iteration is sufficient
  05.10.2011 13:39:22 to get all relationships of the given types,
  05.10.2011 13:39:22 so that it finished after the second iterations when
  deletions == 0
  05.10.2011 13:39:22 if this line gets logged, then there were more than
 two
  iterations, which is bad
 
 
  And the testcase is attached as .java-file. Could please somebody take a
  look at it and the log and maybe find my mistake or confirm that this is
  strange behaviour.
 
  ciao,
  st.p.
 
  ___
  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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index

2011-10-08 Thread Mattias Persson
/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Big Traverser perfomance : are '23 rels per milliseconds' good ?

2011-10-07 Thread Mattias Persson
Also, is that the first run directly after a JVM start? The first time you
encounter a Node or Relationship it is loaded from disk into memory so that
the next time it's read from memory instead. The difference between two runs
can be order of magnitudes in difference.

2011/10/6 Michael Hunger michael.hun...@neotechnology.com

 Hmm virtual machines might be difficult, esp. with the io indirection.

 Your memory settings for the db are:
• Fri Oct 07 00:10:01 IST 2011:
 neostore.nodestore.db.mapped_memory=20M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.arrays.mapped_memory=130M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.index.keys.mapped_memory=1M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.index.mapped_memory=1M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.mapped_memory=90M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.strings.mapped_memory=130M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.relationshipstore.db.mapped_memory=100M

 Can you change that so that it uses the rest of your memory (say 2GB).

• Fri Oct 07 00:10:01 IST 2011:
 neostore.nodestore.db.mapped_memory=200M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.arrays.mapped_memory=100M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.index.keys.mapped_memory=1M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.index.mapped_memory=1M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.mapped_memory=1000M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.propertystore.db.strings.mapped_memory=200M
• Fri Oct 07 00:10:01 IST 2011:
 neostore.relationshipstore.db.mapped_memory=800M

 See also:
 http://docs.neo4j.org/chunked/snapshot/configuration.html

 Could you also have a look at this:
 http://wiki.neo4j.org/content/Linux_Performance_Guide

 Is it possible to share your code/graphdb(generator) - also off-list. I'd
 like to have a look.

 Thanks

 Michael

 Am 06.10.2011 um 22:14 schrieb Guillaume ALLEE:

  Hi,
 
  Here are the answers I can give you quickly:
 
  How much memory does your machine have?
  5066 MB (from free -m)
 
  What kind of disk is in there?
  I do not know, the machine is a VM  provided by another department of my
  company. What I can tell you is that on my i5 laptop the same was taking
 6-8
  minutes.
 
  Have you looked at the memory config for the neo4j db?
  No I did only change the head size.
 
  What kind of scheduler do you use (please try deadline or as)?
  it seems to be as.
 
  Can you please share the config and JVM info that is output at the head
 of
  graphdb/messages.log ?
  see here http://pastebin.com/0geHdbNu
 
 
 
  --
  View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Big-Traverser-perfomance-are-23-rels-per-milliseconds-good-tp3400711p3400925.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] neo4j looks in wrong directories (befuddled newbie about to crack under weirdness)

2011-10-05 Thread Mattias Persson
Could tou try standing in the base dir so that you execute:

./bin/neo4j

? I think that should work.

Den torsdagen den 6:e oktober 2011 skrev simulacron3
simulacr...@wavecable.com:
 Had been using 1.4.1 and 1.4.2 Community with happy results, but tried to
install 1.5M01 and failed. Tried to reinstall 1.4.2 and that also failed.
Now nothing seems to work.

 My attempt at shell install/start looks like this:

 Joe:bin Joe$ sudo ./neo4j install
 ./neo4j: line 297: /Users/Joe/Downloads/bin/org.neo4j.server.plist: No
such file or directory
 # It should be looking under
/Users/Joe/Downloads/neo4j-community-1.4.2/bin/

 org.neo4j.server: Already loaded
 Joe:bin Joe$ sudo ./neo4j start
 Detected installation in launchd, starting it…

 Joe:bin Joe$ sudo ./neo4j status
 Neo4j Server is not running
 Joe:bin Joe$ sudo ./neo4j info
 Neo4j Server is not running
 Using Java version: CurrentJDK
 Error: missing Neo4j Library, expected at /Users/Joe/Downloads/lib
 #It should be looking under
/Users/Joe/Downloads/neo4j-community-1.4.2/bin/

 It seems that the neo4j script is somehow setting the wrong directory for
file search.

 Mac OS X Lion, neo4j 1.4.2-community (linux/MacOX); similar behavior on
Ubuntu 10.4, recent install.

 Any suggestions or pointers would be valued above diamonds and rubies.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user


-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Problem with lucene indexing

2011-10-02 Thread Mattias Persson
Definitely sounds like a classpath issue

2011/10/1 Rick Bullotta rick.bullo...@thingworx.com

 Classpath?

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of andrew ton
 Sent: Saturday, October 01, 2011 5:27 AM
 To: Neo4j_user
 Subject: [Neo4j] Problem with lucene indexing



 Hello,

 I have a problem with indexing when using the Neo4J embedded database. I'm
 using neo4j-1.5M01, neo4j-lucene-index-1.5M01.
 I have tried both lucene-core-3.1.0 and lucene-core-3.4.0. Can somebody
 show me what is wrong here?

 I create an instance of EmbeddedGraphDatabase as
 graphDb = new EmbeddedGraphDatabase(mystore);

 and create index:
 nodeIndex = graphDb.index().forNodes(nodes, MapUtil.stringMap(provider,
 lucene, type, fulltext));

 When I run unit test I have a problem:

 com.ericsson.research.semantic.PersistentEmbeddedOntology -Exception caugth
 while instantiating. No index provider 'lucene' found
 java.lang.IllegalArgumentException: No index provider 'lucene' found

 and this is the messages.log in my store


 Sat Oct 01 01:41:20 PDT 2011: Failed to load index provider lucene
 LUCENE_31
 java.lang.NoSuchFieldError: LUCENE_31
 at
 org.neo4j.index.impl.lucene.LuceneDataSource.clinit(LuceneDataSource.java:88)
 at
 org.neo4j.index.impl.lucene.LuceneIndexImplementation.init(LuceneIndexImplementation.java:72)
 at
 org.neo4j.index.lucene.LuceneIndexProvider.load(LuceneIndexProvider.java:37)
 at
 org.neo4j.kernel.KernelData.loadIndexImplementations(KernelData.java:146)
 at
 org.neo4j.kernel.EmbeddedGraphDbImpl$2.initializeIndexProviders(EmbeddedGraphDbImpl.java:180)
 at org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:159)
 at
 org.neo4j.kernel.EmbeddedGraphDbImpl.init(EmbeddedGraphDbImpl.java:190)
 at
 org.neo4j.kernel.EmbeddedGraphDatabase.init(EmbeddedGraphDatabase.java:80)
 at
 org.neo4j.kernel.EmbeddedGraphDatabase.init(EmbeddedGraphDatabase.java:64)

 Thank you,
 ___
 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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Lucene index recovery

2011-10-01 Thread Mattias Persson
It might be that you're not shutting down the server correctly (bin/neo4j
stop) or that it's shut down at the same time as there are transactions
running. Could you supply your data/graph.db/messages.log to me or look in
it to see if there are any lines containing:

Close invoked with

An example:

Close invoked with 3 running transaction(s)

2011/9/1 Peter Neubauer peter.neuba...@neotechnology.com

 Dima,
 are you shutting down your database correctly? Make sure you can
 database.shutdown() and wait for it to finish ...

 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 Thu, Sep 1, 2011 at 1:31 PM, Dima Gutzeit dima.gutz...@mailvision.com
 wrote:

  Dear list members,
 
  Each time I restart my server based on Neo4J I can see this in the logs:
 
  Sep 1, 2011 7:23:17 PM
  org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog
  doInternalRecovery
  INFO: Non clean shutdown detected on log
 [/opt/data/nioneo_logical.log.2].
  Recovery started ...
  Sep 1, 2011 7:23:18 PM
  org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog
  doInternalRecovery
  INFO: Non clean shutdown detected on log [/opt/data/index/lucene.log.1].
  Recovery started ...
 
  Operation which takes time ... lots of time.
 
  What is the correct way of preventing that when restarting ?
 
  Thanks in advance.
 
  Regards,
  Dima Gutzeit.
  ___
  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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread Mattias Persson
Which version of neo4j did you use to import your data, was it a
downloadable package, from maven or building yourself from a branch?

2011/9/28 René Pickhardt r.pickha...@googlemail.com

 hey everyone

 I got a strange error message that a record is not in use if I call
 hasRelationship() function even though I checked against null before! My
 real purpose was to start the traverser but it exited with the same error
 message. That is why I put the n.hasRelationship which also would not work.

 I imported a graph with 50 mio. nodes and about the same size of
 relationships. (though I am about to import more relationships later on) I
 put 2 mio. nodes in a lucence index called article.

 the counting variable t has the value 2385 (so the first 2385 calls work
 fine) if I skip this node the same problem accoures again at t = 3239.

 maybe it is usefull to say that I inserted the graph using the batch
 inserter.

 IndexHitsNode res = article.get(key, values[0]);
 if (res!=null){
 Node n = res.getSingle();
  if (n!=null){
 if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
 Direction.BOTH)){
  //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
 ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
 UPDATE ) );
  t++;
 }
 }

 callstack:

 org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Record[1983624]
 not in useRecord[1983624] not in use

 at

 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
  at

 org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
 at

 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
  at

 org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
 at

 org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
  at

 org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
 at
 org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
  at

 org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
 at

 org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
  at

 org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
 at org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
  at org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
 at org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
  at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
 at IndexEvaluation.init(IndexEvaluation.java:98)
  at EntryPoint.main(EntryPoint.java:20)

 --
 --
 mobile: +49 (0)176 6433 2481

 Skype: +49 (0)6131 / 4958926

 Skype: rene.pickhardt

 www.rene-pickhardt.de
  http://www.beijing-china-blog.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] threads on embeddedGraphDb

2011-09-28 Thread Mattias Persson
Having multiple threads accessing a neo4j graph database concurrently is
what it's built for. This looks to be an issue with a lucene index.
java.nio.* is very sensitive to thread interrupts, but I've never seen this
exception before. Are you using Thread.interrupt() or some library that
might do that for controlling threads?

2011/9/28 st.pa st...@web.de


 hi,

 while i was not trying to use threads, everything went fine. now i need
 concurrent java threads to access the same (embedded?) graph database.
 neo4j-manual.pdf for 1.4.1 says in section 1.1.2. that i should use
 HighlyAvailableGraphDatabase, which is no longer there in 1.5.1 as it
 seems. i have not looked into server and rest api yet, so is there a way
 to do a threaded app with say a queue thread and n worker threads inside
 the jvm that all do their own transactions on the same database
 location? the following exception is what i got for assigning the queue
 thread's embedded db to the worker threads, i guess.

 Exception in thread Thread-6 java.lang.RuntimeException:
 java.nio.channels.ClosedByInterruptException
 at

 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:603)
 at

 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:486)
 at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)
 at

 org.neo4j.index.impl.lucene.LuceneIndex$RelationshipIndex.get(LuceneIndex.java:480)
 at de.stp.DatabaseNeo4j.removeUrlQueue(DatabaseNeo4j.java:777)
 at de.stp.util.BufferNeo4j.next(BufferNeo4j.java:194)
 at de.stp.RoboNeo4j.nächsterSchritt(RoboNeo4j.java:452)
 at de.stp.RoboNeo4j.run(RoboNeo4j.java:436)
 at java.lang.Thread.run(Thread.java:619)
 Caused by: java.nio.channels.ClosedByInterruptException
 at

 java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
 at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:772)
 at

 org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:225)
 at

 org.apache.lucene.store.MMapDirectory$MMapIndexInput.init(MMapDirectory.java:217)
 at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:209)
 at

 org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:66)
 at

 org.apache.lucene.index.CompoundFileReader.init(CompoundFileReader.java:55)
 at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)
 at

 org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)
 at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1149)
 at

 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:590)
... 8 more

 Thx for any ideas.
 ciao, st.p.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Concerning getting all nodes after a traversal

2011-09-28 Thread Mattias Persson
||);
   
   
---
Console output:::
   
||TIME NEEDED FOR TRAVERSAL: 63 ms||
   
||TIME NEEDED TO GET NODES: 56875 ms||
   

   
Thank you so much,
   
Dan
   
  
 
 

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread Mattias Persson
I'm curious to know how you found that old milestone also :) you picked the
one out of extremely few having some kind of data problems.

Den onsdagen den 28:e september 2011 skrev Chris Gioran
chris.gio...@neotechnology.com:
 Hi Rene,

 According to git log, 1,4.M04 was tagged 10/06/2011, while the fix for
 a bug in the BatchInserterImpl that caused corrupted stores which gave
 the message you are seeing is


https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248

 which has a date of 04/07/2011.

 This makes 1.4.M06 the earliest release to use that does not have this
 issue or, even better, go for 1.4.1 which is the latest stable
 release. Since you are comfortable using milestones, 1.5.M01 might be
 of interest to you.

 http://neo4j.org/download has the links that you need.

 hope that helped,
 CG

 2011/9/28 René Pickhardt r.pickha...@googlemail.com:
 Neo1.4.M04 community edition no self build.

 2011/9/28 Mattias Persson matt...@neotechnology.com

 Which version of neo4j did you use to import your data, was it a
 downloadable package, from maven or building yourself from a branch?

 2011/9/28 René Pickhardt r.pickha...@googlemail.com

  hey everyone
 
  I got a strange error message that a record is not in use if I call
  hasRelationship() function even though I checked against null before!
My
  real purpose was to start the traverser but it exited with the same
error
  message. That is why I put the n.hasRelationship which also would not
 work.
 
  I imported a graph with 50 mio. nodes and about the same size of
  relationships. (though I am about to import more relationships later
on)
 I
  put 2 mio. nodes in a lucence index called article.
 
  the counting variable t has the value 2385 (so the first 2385 calls
work
  fine) if I skip this node the same problem accoures again at t = 3239.
 
  maybe it is usefull to say that I inserted the graph using the batch
  inserter.
 
  IndexHitsNode res = article.get(key, values[0]);
  if (res!=null){
  Node n = res.getSingle();
   if (n!=null){
  if (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
  Direction.BOTH)){
   //n.traverse(Order.BREADTH_FIRST,StopEvaluator.DEPTH_ONE,
 
ReturnableEvaluator.ALL_BUT_START_NODE,DynamicRelationshipType.withName(
  UPDATE ) );
   t++;
  }
  }
 
  callstack:
 
  org.neo4j.kernel.impl.nioneo.store.InvalidRecordException:
 Record[1983624]
  not in useRecord[1983624] not in use
 
  at
 
 

org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:230)
   at
 
 

org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337)
  at
 
 

org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114)
   at
 
 

org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97)
  at
 
 

org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
   at
 
 

org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603)
  at
 

org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:351)
   at
 
 

org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:318)
  at
 
 

org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:305)
   at
 
 

org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:156)
  at
 org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:236)
   at
 org.neo4j.kernel.impl.core.NodeImpl.hasRelationship(NodeImpl.java:576)
  at
 org.neo4j.kernel.impl.core.NodeProxy.hasRelationship(NodeProxy.java:109)
   at IndexEvaluation.GenerateStreams(IndexEvaluation.java:124)
  at IndexEvaluation.init(IndexEvaluation.java:98)
   at EntryPoint.main(EntryPoint.

-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


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

2011-09-28 Thread Mattias Persson
Or webadmin...

1) download the neo4j package
2) put your db in neo4j-dir/data/graph.db/ and start it
3) go to http://localhost:7474, click tab Data Browser and then the right
most button for visualization mode

there's you can see your graph.

2011/9/28 noppanit noppani...@gmail.com

 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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] InvalidRecordException: Record[1983624] not in useRecord[1983624] not in use

2011-09-28 Thread Mattias Persson
So maybe you've hit yet another BatchInserter bug... will have to run a
similar test and try to reproduce it. Can it be reproduced consistently and
with varying data sets/sizes? Can you reproduce it if not using
BatchInserter?

2011/9/28 René Pickhardt r.pickha...@googlemail.com

 I used the current stable release and the problem did not arise anymore but
 I got new problems.

 for many nodes even though (according to the data set they should have
 relations) the
 function  (n.hasRelationship(DynamicRelationshipType.withName( UPDATE ),
 Direction.BOTH)) does not stop. It just seems to jump into an endless loop
 ;(

 I don't think I made a mistake in the code for the batch inserter but i
 just
 attached it. My insertion contains of two steps:

 first I create many node in the graph and store them also in an index:
 batchArticle. I do not query agains the index to check if a node with this
 key already existed. But my keys are unique.

 private void AddBatchNode(String key, String title){
 MapString,Object properties = new HashMapString,Object();

 properties.put( key, key );
 properties.put( title, title );
  properties.put( timestamp, 1 );
 long node = inserter.createNode( properties );

 properties = MapUtil.map( key, key );
 batchArticle.add( node, properties );
  }

 then I attach many updates (also nodes encoded via timestamp) to every node
 and connect them via a relationship.

 private void BatchUpdate(String timestamp, String key) {
 if (batchArticle.get(key, key).getSingle()!=null){
  long node = batchArticle.get(key, key).getSingle();
 MapString,Object properties = new HashMapString,Object();
  properties.put( timestamp, timestamp );
  long ci = inserter.createNode( properties );

 inserter.createRelationship( node, ci, DynamicRelationshipType.withName(
 UPDATE ),null);
 }
  }

 the last step (i did not implement this) is to connect the nodes from the
 first steps via friendship relations. But I wanted to do some testing
 first...

 anyone knows of this problem?

 2011/9/28 Rick Bullotta rick.bullo...@thingworx.com

  Hi, René.
 
  I recognized your error almost immediately, since we encountered it in an
  early 1.4 beta. ;-)
 
  I think you'll have a good result if you can switch to the 1.4.1 release!
 
  Best,
 
  Rick
 
  -Original Message-
  From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
  On Behalf Of René Pickhardt
  Sent: Wednesday, September 28, 2011 10:29 AM
  To: Neo4j user discussions
  Subject: Re: [Neo4j] InvalidRecordException: Record[1983624] not in
  useRecord[1983624] not in use
 
  Hey guys,
 
  I don't know how I found the old milestone. I was downloading it once I
  started using neo4j.
 
  I will just migrate to the current stable version and tell you afterwards
  if
  I still have problems. by your comments I guess the problem will be
 solved.
  Thanks so far!
 
  best regards René
 
  2011/9/28 Mattias Persson matt...@neotechnology.com
 
   I'm curious to know how you found that old milestone also :) you picked
  the
   one out of extremely few having some kind of data problems.
  
   Den onsdagen den 28:e september 2011 skrev Chris Gioran
   chris.gio...@neotechnology.com:
Hi Rene,
   
According to git log, 1,4.M04 was tagged 10/06/2011, while the fix
 for
a bug in the BatchInserterImpl that caused corrupted stores which
 gave
the message you are seeing is
   
   
  
  
 
 https://github.com/neo4j/community/commit/71fbe4ac1174fad16a7bb154c9f78d3f1b377248
   
which has a date of 04/07/2011.
   
This makes 1.4.M06 the earliest release to use that does not have
 this
issue or, even better, go for 1.4.1 which is the latest stable
release. Since you are comfortable using milestones, 1.5.M01 might be
of interest to you.
   
http://neo4j.org/download has the links that you need.
   
hope that helped,
CG
   
2011/9/28 René Pickhardt r.pickha...@googlemail.com:
Neo1.4.M04 community edition no self build.
   
2011/9/28 Mattias Persson matt...@neotechnology.com
   
Which version of neo4j did you use to import your data, was it a
downloadable package, from maven or building yourself from a
 branch?
   
2011/9/28 René Pickhardt r.pickha...@googlemail.com
   
 hey everyone

 I got a strange error message that a record is not in use if I
 call
 hasRelationship() function even though I checked against null
  before!
   My
 real purpose was to start the traverser but it exited with the
 same
   error
 message. That is why I put the n.hasRelationship which also would
  not
work.

 I imported a graph with 50 mio. nodes and about the same size of
 relationships. (though I am about to import more relationships
  later
   on)
I
 put 2 mio. nodes in a lucence index called article.

 the counting variable t has the value 2385 (so the first 2385
 calls
   work
 fine) if I skip this node the same problem accoures again at t =
   3239

Re: [Neo4j] add property to all relationships

2011-09-27 Thread Mattias Persson
2011/9/26 Rick Bullotta rick.bullo...@thingworx.com

 Or you could simply call the alternate version of getProperty with a
 default value of zero...

 +1 it sounds like you're putting a lot of default values on the
relationships... that's just what getProperty(key,defaultValue) is for.

 On Sep 26, 2011, at 5:44 AM, sometime dons...@gmail.com wrote:

  Hi!
 
  I have 1.2M nodes and 5M relationships. Around 20 000 relationships are
 two
  properties: prop1 prop2, the remaining relationships have only one
 property:
  prop1.
  I've got all the relationships that have only one property - add prop2
 with
  value 0.
 
  It should run on all relationships and add this property?
 
  If yes - then I have to run the robot and it will run at least 3 days.
  Can be somehow easier to solve this problem so as not to spend too much
  time?
 
  --
  View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/add-property-to-all-relationships-tp3368779p3368779.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Has been blocked when i get the node's property

2011-09-25 Thread Mattias Persson
If you've got 100 concurrent threads writing to one node only one can write
to it at a time. Write locks are held from the time you do a write operation
on that node until that transaction which made that write operation
finishes. So in this scenario your setProperty calls will be serial instead
of parallell. Is this just a test or are you having a problem with this in a
real scenario?

2011/9/25 iamyuanlong yuanlong1...@gmail.com

 hi McKinley,
 This is my test code:

 http://neo4j-community-discussions.438527.n3.nabble.com/file/n3366449/Entity.java
 Entity.java

 http://neo4j-community-discussions.438527.n3.nabble.com/file/n3366449/EntityTest2.java
 EntityTest2.java



 Do the testCreateNode to create a node with a property fansnum.
 Then run testConcurrent. You will find  a lot logs about get node's
 property
 will cost more then 1ms.In fact more then 15ms. Why?


 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Has-been-blocked-when-i-get-the-node-s-property-tp3365819p3366449.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




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] performance guide

2011-09-24 Thread Mattias Persson
2011/9/10 Linan Wang tali.w...@gmail.com

 Andreas,
 thanks. can't wait for your result.
 one correction on my list:
 Retrieve a certain types of relationships of a node should be faster
 than retrieve all. i mis-read the source code in NodeImpl.java, in
 which private volatile RelIdArray[] relationships is an array of
 array.

 the updated list:
 1, Read id of a node/relationship.
 2, Read property value of a node/relationship.
 3, Set property value of a node/relationship.
 4, Retrieve a node/relationship by id.
 5, Create a new node/relationship.
 6, Retrieve a node by external id from node index.
 7, Retrieve a certain subset of relationships of a node from
 RelationshipIndex.
 8, Retrieve all relationships of a node.
 9, Retrieve a certain types of relationships of a node.
 10, Add a node to index.
 11, Add a relationship to index.

 could anyone confirm that to iterate relationships of a node,
 Node.getRelationships() is faster than using
 RelationshipIndex.get(KEY, VAL, node, null)? thanks


For Node#getRelationships(): i.e. get all, not of any particular type,
Node#getRelationships should always be faster.

If you however call Node#getRelationships(someType) or any of the methods
specifying one or more types and compare that to a rel index query with a
specific type the answer isn't as straight forward: If you've got a warm
cache (i.e. all relationships for that node have been loaded once before)
#getRelationships is faster than going through an index. If the node isn't
warm it depends on how many relationships out of the node's total amount of
relationships you'd like to retrieve. If it has many relationships and
there's only a few of that type then it would load many relationships that
weren't relevant for your request. The index would only load the required
relationships and would hence be faster there.


 On Sat, Sep 10, 2011 at 1:46 AM, Andreas Kollegger
 andreas.kolleg...@neotechnology.com wrote:
  Hi Linan,
 
  These are good questions. I am currently following a similar approach to
 characterizing the performance of basic graph operations, and then also
 simple graph algorithms on various shapes of graphs. My initial
 investigation is on small graphs on my laptop, but this weekend I'm testing
 large graphs on Amazon instances (large, as in  500 million nodes).
 
  I'll post the summary of my findings from this weekend, then continue to
 elaborate on the operations and different server configurations.
 
  Best,
  Andreas
 
  On Sep 9, 2011, at 4:29 PM, Linan Wang wrote:
 
  hi,
  I once read a blog about how long it take for computation operations
  such as read from L1 cache, RAM access, send packet from usa to eu,
  etc. having a rough idea of the relative cost of major computation
  operations, we have better control. for example, in my project i also
  use property to store a cityid apart from create a relationship
  between user to city, because if reading an int property is 10x faster
  than getSingleRelationship + relationship.getEndNode + cityNode.getId.
 
  I'm wondering if could having similar list for neo4j operations. I
  understand some operations could be faster than another depending on
  different conditions. but let's only focus on basic read/write
  operations.
 
  below is my guess, from fastest to slowest, feel free to correct me
  and add more.
 
  1, Read id of a node/relationship.
  2, Read property value of a node/relationship.
  3, Set property value of a node/relationship.
  4, Retrieve a node/relationship by id.
  5, Create a new node/relationship.
  6, Retrieve a node by external id from node index.
  7, Retrieve all relationships of a node.
  8, Retrieve a certain subset of relationships of a node from
 RelationshipIndex.
  9, Retrieve a certain types of relationships of a node.
  10, Add a node to index.
  11, Add a relationship to index.
 
  --
  Best regards
 
  Linan Wang
  ___
  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
 



 --
 Best regards

 Linan Wang
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


  1   2   3   4   5   6   7   8   9   10   >