Re: [Neo4j] Unable to build a master-slave system
George, I think you should switch to neo4j-kernel 1.1-SNAPSHOT and online-backup 0.6-SNAPSHOT. You can find an example test at https://svn.neo4j.org/components/online-backup/trunk/src/test/java/org/neo4j/onlinebackup/MultiRunningTest.java , backing up a master database to a backup in another directory (you can to a number of them of course) Does that help? Cheers, /peter neubauer COO and Sales, Neo Technology 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Wed, Jul 28, 2010 at 4:55 PM, George Ciubotaru george.ciubot...@weedle.com wrote: Hello, I'm trying to build a high availability system with neo4j as explained here: http://wiki.neo4j.org/content/Online_Backup_HA. In theory everything looks pretty simple and straightforward... but once I try to run the slave process I'm getting the following exception: Throwing away org.neo4j.onlinebackup.net.connecttomaster...@1f1fba0 java.nio.channels.NotYetConnectedException at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(Unknown Source) at sun.nio.ch.SocketChannelImpl.write(Unknown Source) at org.neo4j.onlinebackup.net.Connection.write(Connection.java:238) at org.neo4j.onlinebackup.net.ConnectToMasterJob.sendGreeting(ConnectToMasterJob.java:55) at org.neo4j.onlinebackup.net.ConnectToMasterJob.performJob(ConnectToMasterJob.java:141) at org.neo4j.onlinebackup.net.JobEater.run(JobEater.java:32) ... followed by this exception on master side: Connection closed Connection[slave_ip_address:11587] org.neo4j.onlinebackup.net.SocketException: Connection[slave_ip_address:11587] error reading Throwing away org.neo4j.onlinebackup.net.handleincommingslave...@fd13b5 at org.neo4j.onlinebackup.net.Connection.read(Connection.java:210) at org.neo4j.onlinebackup.net.HandleIncommingSlaveJob.getGreeting(HandleIncommingSlaveJob.java:41) at org.neo4j.onlinebackup.net.HandleIncommingSlaveJob.performJob(HandleIncommingSlaveJob.java:160) at org.neo4j.onlinebackup.net.JobEater.run(JobEater.java:93) Caused by: java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureReadOpen(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) at org.neo4j.onlinebackup.net.Connection.read(Connection.java:205) ... 3 more null chain job Any idea of what might be wrong here? (I'm running everything on 64-bit Windows (7 or Server 2008 R2), neo4j-kernel 1.0 and online-backup 0.5) Thank you, George ___ 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
Re: [Neo4j] Node attributes as multiple lucene fields
2010/7/19 Andrew Mutz andrew.m...@appfolio.com Thanks Tobias! One more quick question: I'm using Neo4J-Rest. Right now, I'm modifying the rest project to use this prototyped index component. I'm fine continuing down this road, but I wanted to ask if anyone else has been doing the same thing? Is there a (presumably prerelease) version of Neo4J-Rest that uses this for indexing? No, it hasn't been done yet. If not, I'll continue modifying neo4j-rest on my own to test it out. Also, regarding timescale, should we expect to see this new indexing component be in a releasable state in a few months? Hopefully that will be the case. Compound indexing is a quite requested feature for Neo4j Thanks very much. I've been very impressed with Neo4J so far. Glad to hear that! -Andrew. On Sat, Jul 17, 2010 at 8:43 PM, Tobias Ivarsson tobias.ivars...@neotechnology.com wrote: This feature is available in the new index component that is being prototyped at https://svn.neo4j.org/laboratory/components/lucene-index/ It is being built by the buildbot, which means that prebuilt snapshots are available at http://m2.neo4j.org/org/neo4j/neo4j-lucene-index/0.1-SNAPSHOT/ Please try it out and let us know what you think! Cheers, Tobias On Sun, Jul 18, 2010 at 3:42 AM, Andrew Mutz andrew.m...@appfolio.com wrote: Hi all, I've been getting up to speed in the last few days with the Lucene indexing capabilities in Neo4J and I have a question: When Neo4J creates a Lucene Document for indexing, it only assigns it two fields, the node id and the contents to be indexed. Is it possible to write to multiple lucene document fields? What I'd like is to be able to index multiple node attributes as multiple fields in a single lucene document. My goal is to be able to search on one field (node attribute) and use the others as boost fields for sorting the relevancy of the results returned. If my understanding is correct, and this is not currently possible, is this planned in the future? If it is not planned, would the Neo4J community be interested in me adding this functionality? And who would I talk to about this? Thanks, Andrew. -- Andrew Mutz Senior Software Engineer AppFolio, Inc. 55 Castilian Dr. | Goleta, CA | 93117 Phone: 805.617.2167 | Fax: 805.968.0646 andrew.m...@appfolio.com www.appfolio.com - Web-Based Property Management Software Made Easy. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Andrew Mutz Senior Software Engineer AppFolio, Inc. 55 Castilian Dr. | Goleta, CA | 93117 Phone: 805.617.2167 | Fax: 805.968.0646 andrew.m...@appfolio.com www.appfolio.com - Web-Based Property Management Software Made Easy. ___ 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 and sorting results
Any luck with this? 2010/7/20 Mattias Persson matt...@neotechnology.com I copied that org.apache.lucene.Hits class into the lucene-index component, so it exists there in that package (and has existed there since the birth of this component). That's the class that LuceneIndex.search uses, not the one from lucene-core-3 (since it has been removed). 2010/7/20 Andrew Mutz andrew.m...@appfolio.com I was changing the neo4j-rest server to use the new lucene-index framework myself, and have been very frustrated with this problem. There seems to be a lucene version conflict: - org.neo4j.index.impl.lucene.LuceneIndex.search() uses org.apache.lucene.Hits, which was removed in lucene 3.0 - org.neo4j.index.impl.lucene.IndexType.query() seems to assume lucene version 3.0 (Version.LUCENE_30) So I can't use lucene 3.0 or above for the first reason, and I need to use 3.0 for the second reason. How are others able to use this? Am I doing something wrong? Maybe I should just wait until your changes go in? Thanks, Andrew. On Tue, Jul 20, 2010 at 12:38 PM, Mattias Persson matt...@neotechnology.com wrote: Sorting by relevance is possible via http://components.neo4j.org/neo4j-index/apidocs/org/neo4j/index/lucene/LuceneIndexService.html#getNodes(java.lang.String,%20java.lang.Object,%20org.apache.lucene.search.Sort)http://components.neo4j.org/neo4j-index/apidocs/org/neo4j/index/lucene/LuceneIndexService.html#getNodes%28java.lang.String,%20java.lang.Object,%20org.apache.lucene.search.Sort%29 . Exposing this sorting thingie would require you to add that in the rest code as well (as you probably could guess). But the IndexService doesn't support querying for more than one property at a time. However, there's a new indexing framework in the making over at https://svn.neo4j.org/laboratory/components/lucene-index/ which allows you to do these types of queries. This new framework will probably make its way into trunk rather soon and eventually replace the indexing found in neo4j-index component today. So the answer is no if you use neo4j-index component (which REST does). But it's yes if REST were to use the new framework instead. I'll commit the additions regarding sorting and all that soon (I'm laborating with it a.t.m.). You could f.ex. ask a query like: for ( Node node : myTitleIndex.query( new QueryContext( +title:foo* description:bar ).sort( Sort.RELEVANCE ) ) {} 2010/7/16 Andrew Mutz andrew.m...@appfolio.com Hi all, I've been evaluating using Neo4J for a project at my company and have been consistently impressed with it's capabilities. There is one thing I need to do, however, that I'm not sure is possible. I'm using the Neo4J REST server. I've been using lucene full text indexing/searching on my node attributes with great success. What I want to be able to do is to adjust the relevancy of the results returned by lucene based on attributes *other* than the one I'm searching on. Example: Nodes have attributes title and description. I want to search for all nodes, say, whose title matches foo*, but have whether or not description matches bar* affect the order of the search results. Is this possible? I'm very comfortable getting my hands dirty in the source, so if this is going to require some hacking, just point me in the right direction. I've been extensively modifying the REST server to fit my needs, so ideally my changes would be in that part of the code base. But I'm willing to dig deeper if necessary. Thanks much, Andrew. -- Andrew Mutz Senior Software Engineer AppFolio, Inc. 55 Castilian Dr. | Goleta, CA | 93117 Phone: 805.617.2167 | Fax: 805.968.0646 andrew.m...@appfolio.com www.appfolio.com - Web-Based Property Management Software Made Easy. ___ 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 -- Andrew Mutz Senior Software Engineer AppFolio, Inc. 55 Castilian Dr. | Goleta, CA | 93117 Phone: 805.617.2167 | Fax: 805.968.0646 andrew.m...@appfolio.com www.appfolio.com - Web-Based Property Management Software Made Easy. ___ 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] Node attributes as multiple lucene fields
Andrew, if you care to contribute the code, feel free to follow the CLA at http://wiki.neo4j.org/content/About_Contributor_License_Agreement and you can work in the laboratory or in a branch for the component? Cheers, /peter neubauer COO and Sales, Neo Technology 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Mon, Jul 19, 2010 at 8:53 PM, Andrew Mutz andrew.m...@appfolio.com wrote: Thanks Tobias! One more quick question: I'm using Neo4J-Rest. Right now, I'm modifying the rest project to use this prototyped index component. I'm fine continuing down this road, but I wanted to ask if anyone else has been doing the same thing? Is there a (presumably prerelease) version of Neo4J-Rest that uses this for indexing? If not, I'll continue modifying neo4j-rest on my own to test it out. Also, regarding timescale, should we expect to see this new indexing component be in a releasable state in a few months? Thanks very much. I've been very impressed with Neo4J so far. -Andrew. On Sat, Jul 17, 2010 at 8:43 PM, Tobias Ivarsson tobias.ivars...@neotechnology.com wrote: This feature is available in the new index component that is being prototyped at https://svn.neo4j.org/laboratory/components/lucene-index/ It is being built by the buildbot, which means that prebuilt snapshots are available at http://m2.neo4j.org/org/neo4j/neo4j-lucene-index/0.1-SNAPSHOT/ Please try it out and let us know what you think! Cheers, Tobias On Sun, Jul 18, 2010 at 3:42 AM, Andrew Mutz andrew.m...@appfolio.com wrote: Hi all, I've been getting up to speed in the last few days with the Lucene indexing capabilities in Neo4J and I have a question: When Neo4J creates a Lucene Document for indexing, it only assigns it two fields, the node id and the contents to be indexed. Is it possible to write to multiple lucene document fields? What I'd like is to be able to index multiple node attributes as multiple fields in a single lucene document. My goal is to be able to search on one field (node attribute) and use the others as boost fields for sorting the relevancy of the results returned. If my understanding is correct, and this is not currently possible, is this planned in the future? If it is not planned, would the Neo4J community be interested in me adding this functionality? And who would I talk to about this? Thanks, Andrew. -- Andrew Mutz Senior Software Engineer AppFolio, Inc. 55 Castilian Dr. | Goleta, CA | 93117 Phone: 805.617.2167 | Fax: 805.968.0646 andrew.m...@appfolio.com www.appfolio.com - Web-Based Property Management Software Made Easy. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Tobias Ivarsson tobias.ivars...@neotechnology.com Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Andrew Mutz Senior Software Engineer AppFolio, Inc. 55 Castilian Dr. | Goleta, CA | 93117 Phone: 805.617.2167 | Fax: 805.968.0646 andrew.m...@appfolio.com www.appfolio.com - Web-Based Property Management Software Made Easy. ___ 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
Re: [Neo4j] Unable to build a master-slave system
Hi Peter, Yes, this helped indeed, it works perfect. Thanks! Do you have any advices about how to keep the slave as up to date as possible with the master? I mean I need as often updates to the slaves as possible without impacting too much masters' performance. Thanks, George -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Peter Neubauer Sent: 29 July 2010 08:47 To: Neo4j user discussions Subject: Re: [Neo4j] Unable to build a master-slave system George, I think you should switch to neo4j-kernel 1.1-SNAPSHOT and online-backup 0.6-SNAPSHOT. You can find an example test at https://svn.neo4j.org/components/online-backup/trunk/src/test/java/org/neo4j/onlinebackup/MultiRunningTest.java , backing up a master database to a backup in another directory (you can to a number of them of course) Does that help? Cheers, /peter neubauer COO and Sales, Neo Technology 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Wed, Jul 28, 2010 at 4:55 PM, George Ciubotaru george.ciubot...@weedle.com wrote: Hello, I'm trying to build a high availability system with neo4j as explained here: http://wiki.neo4j.org/content/Online_Backup_HA. In theory everything looks pretty simple and straightforward... but once I try to run the slave process I'm getting the following exception: Throwing away org.neo4j.onlinebackup.net.connecttomaster...@1f1fba0 java.nio.channels.NotYetConnectedException at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(Unknown Source) at sun.nio.ch.SocketChannelImpl.write(Unknown Source) at org.neo4j.onlinebackup.net.Connection.write(Connection.java:238) at org.neo4j.onlinebackup.net.ConnectToMasterJob.sendGreeting(ConnectToMa sterJob.java:55) at org.neo4j.onlinebackup.net.ConnectToMasterJob.performJob(ConnectToMast erJob.java:141) at org.neo4j.onlinebackup.net.JobEater.run(JobEater.java:32) ... followed by this exception on master side: Connection closed Connection[slave_ip_address:11587] org.neo4j.onlinebackup.net.SocketException: Connection[slave_ip_address:11587] error reading Throwing away org.neo4j.onlinebackup.net.handleincommingslave...@fd13b5 at org.neo4j.onlinebackup.net.Connection.read(Connection.java:210) at org.neo4j.onlinebackup.net.HandleIncommingSlaveJob.getGreeting(HandleI ncommingSlaveJob.java:41) at org.neo4j.onlinebackup.net.HandleIncommingSlaveJob.performJob(HandleIn commingSlaveJob.java:160) at org.neo4j.onlinebackup.net.JobEater.run(JobEater.java:93) Caused by: java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureReadOpen(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) at org.neo4j.onlinebackup.net.Connection.read(Connection.java:205) ... 3 more null chain job Any idea of what might be wrong here? (I'm running everything on 64-bit Windows (7 or Server 2008 R2), neo4j-kernel 1.0 and online-backup 0.5) Thank you, George ___ 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
Re: [Neo4j] Querying for nodes that have no relationhip to a specfic node
Hi, I have a proposal for a very different solution. First On Wed, Jul 28, 2010 at 6:36 PM, David Montag david.mon...@neotechnology.com wrote: Hi Alberto, On Wed, Jul 28, 2010 at 5:02 PM, Alberto Perdomo alberto.perd...@gmail.comwrote: Hi David, But then you need to store the result. You can store these metrics as relationships in neo4j, and then just update them for each user when you recompute. You can find the user nodes via indexing. Maybe it's acceptable that some metrics are out of date, so you can just background process them continuously. I already have background processes that go through all users and calculate new new pairs. But then in order to do that I do need to exclude the pairs I already have... because it would be silly and as the relationship density grows the probablity of calculating a pair again would be higher and higher... Would I be able to do that kind of query using indexing? From your description it sounds like the factors that influence the metric don't change, so a single calculation per pair is enough. In this case, you could just determine the pairs in some way and then do the computation, storing the relationship in Neo4j. You can do it all in one go, nothing fancy. You would of course have to compute the metric to N peers for each new user. In other scenarios, the factors that influence the metric might change over time, e.g. a user's city or favorite movie. Then you actually need to keep recomputing the metric between existing users, and yes, then you probably want some scheme to make sure that you don't starve some users. You might for example want to prioritize the most active users first. Again, I don't know if this applies to your case though. As for the indexing, I'm not sure how you would use it here. Like, what kind of querying were you picturing? Depending on your scenario, if your users know each other, it might be interesting to start computing in a foaf style order (breadth first). Remember, the power is in the relationships. Isolated nodes are not interesting. You mean I look first for possible pairs with users that are friends of friends instead of randomly? We are also interesting in storing friendship relationship so that sounds interesting. That would be a different type of query: Traverse the graph from node A to nodes which are friends of friends of A and have no match relationship with A. I guess that is not difficult to implement using Neo4j? Exactly, so you might want to start with the most relevant other people, i.e. people you can realistically meet IRL via friends. Don't know if that's relevant to your application though. Neo4j would be a perfect fit for storing friendship relationships between users. It opens up all kinds of interesting data mining possibilities. The FOAF query would be easy to write using the Neo4j APIs, or some other tool such as Gremlin on top of Neo4j. So you could combine the friendship relationships with your processing step and prioritize active users, and start by checking people close to them in their social network. Again, if it's relevant. And, as Mattias suggested, if you can leverage friendship relationships between users, you might be able to calculate your metric on the fly, given that you limit the search to the user's extended social network. Of course, if you go deep enough, you might reach all users this way too. Thanks for your input David! Glad to be of service. Ask as much as you like! We're all learning here :) ___ 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