[Neo4j] Querying multivalued properties

2011-09-20 Thread Alexandre de Assis Bento Lima
Hi, I need multivalued properties in my application. However, I don't know how to make queries based on them using indexes. I need to search nodes that have a certain value inside their multivalued properties (arrays). Does anybody know how can I do that? I couldn't find anything in the docu

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

2011-09-20 Thread iamyuanlong
hi Peter, This can get the result.But if I want to contain B's Friends too.Should I use this? http://neo4j-community-discussions.438527.n3.nabble.com/file/n3354221/follow%26friend.jpg Use: START b=(node_auto_index,'name:B') MATCH a-[:FOLLOW]->b-[:FOLLOW]->a or a-[:FRIEND]->b-[:FRIEND]->a RETU

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread Linan Wang
Stephan, what's the size of your db? if it's under 10G, how about just dump the full directory into to a ramfs. leave 1G to jvm and it'll do heavy io on the ramfs. i think it's a simple solution and could yield interesting result. please let me know the result if you tried. thanks On Tue, Sep 20,

Re: [Neo4j] Representing relationship strength

2011-09-20 Thread Tatham Oddie
Relationships can carry a data payload. You could introduce a weight property there. -- Tatham -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of editor Sent: Wednesday, 21 September 2011 12:52 AM To: user@lists.neo4j.org Subject: [

Re: [Neo4j] Neo4j graph collections introduction of NodeCollection interface

2011-09-20 Thread Bryce
Hi Niels, Probably is a good idea. I will try to get something done around that soon, flat out with work issues/features at present (including a "nice" concurrency bug, argh). Cheers Bryce On Wed, Sep 21, 2011 at 2:01 AM, Niels Hoogeveen wrote: > > Hi Bryce, > Sorry for the late response. > I

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

2011-09-20 Thread Marko Rodriguez
Hi, >> I have some relation like this: >> http://neo4j-community-discussions.438527.n3.nabble.com/file/n3352328/follow.jpg >> >> what should I do to get the users who has been B Followed and has Followed >> back to B. >> In the image the result should be (A). > > In Gremlin (http://docs.neo4j.

[Neo4j] Design help for G+ like app

2011-09-20 Thread ant-1
Hi, I'm our company software architect, and I'm new to GraphDBs. But as we're building a Google+-like, we realized the need for something like Neo4j. And as this community seems the best, we settle for you guys :) Anyway. Onto the design. Call us fools, but we're trying to redo Google+ (except fo

[Neo4j] REST API Base URI

2011-09-20 Thread Nuo Yan
I access my neo4j server through the REST API. For security purpose, I put the neo4j server behind a nginx lb. I'm wondering if there is config entry somewhere that I can set the neo4j server to return a customized base uri that I can set to my LB's uri. For example, currently creating a node by P

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread Peter Neubauer
Steven, the index is built into the DB, so you can use something like http://docs.neo4j.org/chunked/snapshot/tutorials-java-embedded-index.html to index all your nodes into Lucene (in one index, the node as key, the number of relationships as numeric value when creating them). When reading, you wou

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread st3ven
Hello Peter, it's a pity that neo4j doesn't support full graph-scans. Is there maybe a possibility to cache more relationships to speed things up a little bit. I recognized that only the iteration over the relationships is taking hours. The time to get all relationships of one node is quite fast.

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread Linan Wang
hi stephan, my theory is that most of the time would spent on retrieving imcoming relationships. could you try again but this time only retrieve outgoing relationship? for (Node node : db.getAllNodes()) { if (node.getId() > 0) { long test = Sys

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread Michael Hunger
The "retrieval" is only virtual, as it is lazy. When I get back to my machine on Thursday, I gonna run your tests and get back to you. I have made some modifications on the relationship loading and want to see how that affects this. There are issues loading lots of relationships with cold cache

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

2011-09-20 Thread Adriano Henrique de Almeida
With cypher you can do: start a=(10) match a-[:FOLLOW]->b-[:FOLLOW]->a return a where 10 can be your node Id or you can either use an index. Cheers. 2011/9/20 iamyuanlong > hi all, > I have some relation like this: > > http://neo4j-community-discussions.438527.n3.nabble.com/file/n3352328/fol

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

2011-09-20 Thread Peter Neubauer
In Cypher (http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html) START b=(node_auto_index,'name:B') MATCH a-[:FOLLOW]->b, b-[:FOLLOW]->a RETURN a see https://github.com/neo4j/community/blob/d413404a88db989fd289581ecee6e68faec00ace/embedded-examples/src/test/java/org/neo4j/examples/Short

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread st3ven
Hello again, the bottle neck is at the iteration. I did some tests with it to check whether the iteration or relationship retrievel is to slow. My test results look like this: Retrieval:1ms; Counting:158ms; number of edges:116407 Retrieval:0ms; Counting:2ms; number of edges:1804 Retrieval:0ms; C

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

2011-09-20 Thread iamyuanlong
hi all, I have some relation like this: http://neo4j-community-discussions.438527.n3.nabble.com/file/n3352328/follow.jpg what should I do to get the users who has been B Followed and has Followed back to B. In the image the result should be (A). -- View this message in context: http://neo4j-c

[Neo4j] Representing relationship strength

2011-09-20 Thread editor
I'm looking into a persistant representation of a naive Bayesian classifier using a graph database. I have three basic object types: users, words and and topics. The relationships between these nodes would represent the strength of their connection -- a probability between zero and one. To query t

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread Linan Wang
hi stephan i'm wondering if any difference if you could specify the relationship when counting degrees: RelationshipType knows = DynamicRelationshipType.withName("KNOWS"); Iterable rels = node.getRelationship(knows); count = com.google.common.collect.Iterables.size(rels); besides, do you know whe

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread Peter Neubauer
Steven, in this scenario, you are reading up the entire db, and basically have it cold. Neo4j is not optimized in itself to do full graph-scans. I see a few solutions for you: - store the number of relationships as a property on nodes and read only that. this works if the updates to your graph are

Re: [Neo4j] Neo4j graph collections introduction of NodeCollection interface

2011-09-20 Thread Niels Hoogeveen
Hi Bryce, Sorry for the late response. I understand it's difficult to come up with a really good use-case for making NodeCollection more general in the context of IndexedRelationships, but I like to think of that interface as something we can eventually use for all sorts of collections, not jus

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread st3ven
Hi, I already tried these java parameters, but that didn't really speedup the process and i already turned atime off. As Java parameters I am using right now -d64 -server -Xms7G -Xmx14G -XX:+UseParallelGC -XX:+UseNUMA What I've also noticed is, that reading from the database is really slow on my h

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread Linan Wang
hi Stephan, have you set the -Xms, -XX:+UseNUMA, and -XX:+UseConcMarkSweepGC? they could speedup the process significantly. also, if you like, the jrockit is fast and free now. give it a try. btw, which file system you are using? have you turned off atime? On Tue, Sep 20, 2011 at 12:00 PM, st3ven

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread st3ven
Peter, the import of the data into the graph database is not the main problem for me. The lookup of nodes from the index is fast enough for me. To create the database it took me nearly half a day. My main problem here is getting the node degree of every node. As I already said I am using this co

Re: [Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread Peter Neubauer
Steven, the most performant way to insert data with the BatchInserter is to first insert the nodes only form your node file (that should be fast). After that (or at the same time), find a way to generate the relationship file with Neo4j IDs rather than being forced to look the nodes up in indexes d

[Neo4j] Creating a graph database with BatchInserter and getting the node degree of every node

2011-09-20 Thread st3ven
Hello neo4j-comunity, I am creating a graph database for a social network. To create the graph database I am using the Batch Inserter. The Batch Inserter inserts data from 2 files into the graph database. Files: 1. the first file contains the Nodes I want to create (about 3.5M Nodes) The