Hi! >> Seems like the node and index modifications belong in the same >> transaction, to make sure any modifications to nodes are always >> reflected in the indexes as well. Otherwise they could get out of sync >> if your application crashes after the commit of the first, >> node-modifying transaction. > it seems confusing. if indexing actions wrapped inside a transaction > and the transaction fails, will indexing action automatically get > rollback? think this example:
Yes, it will be rolled back - that's the point of performing multiple operations in the same transaction. /anders > > class User{ > public void dosomething(){ > //node actions > //index actions > } > } > > class Ext extends ServerPlugin{ > public action(){ > // get an array of users; > Transaction tx = graphDb.beginTx(); > try > { > ... // operations that work with the graph > for(User u:users){ > u.dosomething(); > } > tx.success(); > } > finally > { > tx.finish(); > } > } > > } > >> >> /anders >> >> >>>> >>>> >>>> /anders >>>> >>>>> 4, what's the best practice to do bulk insertion when running (not >>>>> seed initial data)? i read post says that too many insertions within a >>>>> transaction may lead to memory problem? what's the proper mount of >>>>> insertion within a transaction? >>>>> 5, is there a suggested max length for string/array property? would it >>>>> be better to put into sql? >>>>> 6, say a facebook user may "likes" thousands of things, and these >>>>> things are sparsly connected. in this case, things should be modeled >>>>> as nodes or array property? >>>>> 7, where can i find an example to use domain models with serverplugin? >>>>> i want to put my data in a standalone server and just use the >>>>> serverplugin, unmanaged extension. should i just put the domain models >>>>> into the same serverplugin jar? >>>>> 8, the warning in the documentation about unmanaged extension is >>>>> scary. what i can see is that people may use bad ways, instead of >>>>> Iterator/IteratorWrappers. any comment on this? >>>>> 9, i'm not sure if it's trival: find out users who are only 2 >>>>> relationships a way (use twitter example: my followees' followers), >>>>> live in same city, group by age and gender. also retrieve all their >>>>> followees. i want to do the traversal in java, where can i find an >>>>> examples? >>>>> 10, i've had horrible experience in turning jvm options. have neo4j >>>>> been running on Zing JVM, hp nonstop jvm? are they better options? >>>>> >>>>> thanks in advance >>>>> >>>>> >>>>> 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 >>>> >>> >>> >>> >> _______________________________________________ >> 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