Re: [Neo4j] How To Properly Shutdown Neo4J

2011-12-10 Thread Romiko Derbynew
public void ShutdownServer()
{
ExecuteScalarGremlin(g.getRawGraph().shutdown(), null);
}

http://hg.readify.net/neo4jclient/src/468ba9578548/Neo4jClient/GraphClient.cs


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Kevin Dieter
Sent: Saturday, 10 December 2011 1:40 AM
To: Neo4j user discussions
Subject: [Neo4j] How To Properly Shutdown Neo4J

Hi,

I am running neo4j v1.4.2 as a Windows service and seem to be unable to cleanly 
shutdown and restart the service.  If I stop and then restart the Windows 
service, I get the following in the messages.log file and it proceeds to go 
through the recovery process (which can take anywhere from
15 to 60 minutes).

Is there another (clean) way to stop and restart the service?

Thanks,

Kevin


2011-12-08 14:51:06.057-0500: c:\neo4j\data\graph.db\neostore non clean 
shutdown detected
2011-12-08 14:51:06.067-0500:
c:\neo4j\data\graph.db\neostore.relationshiptypestore.db non clean shutdown 
detected
2011-12-08 14:51:06.075-0500:
c:\neo4j\data\graph.db\neostore.relationshiptypestore.db.names non clean 
shutdown detected
2011-12-08 14:51:06.103-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db non clean shutdown detected
2011-12-08 14:51:06.105-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db.strings non clean shutdown 
detected
2011-12-08 14:51:06.115-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db.index non clean shutdown 
detected
2011-12-08 14:51:06.123-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db.index.keys non clean shutdown 
detected
2011-12-08 14:51:06.125-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db.arrays non clean shutdown 
detected
2011-12-08 14:51:06.127-0500:
c:\neo4j\data\graph.db\neostore.relationshipstore.db non clean shutdown detected
2011-12-08 14:51:06.129-0500: c:\neo4j\data\graph.db\neostore.nodestore.db
non clean shutdown detected
2011-12-08 14:51:06.155-0500: Non clean shutdown detected on log 
[c:\neo4j\data\graph.db\nioneo_logical.log.2]. Recovery started ...
2011-12-08 14:51:06.159-0500: [c:\neo4j\data\graph.db\nioneo_logical.log.2]
logVersion=53 with committed tx=3533582
2011-12-08 15:04:32.197-0500: [c:\neo4j\data\graph.db\nioneo_logical.log.2]
entries found=177304 lastEntryPos=7898318
2011-12-08 15:04:32.198-0500: Internal recovery completed, scanned 177304 log 
entries. Recovered 22214 transactions. Last tx recovered: 3555796
2011-12-08 15:04:32.198-0500:
XaResourceManager[c:\neo4j\data\graph.db\nioneo_logical.log] sorting 1 xids
2011-12-08 15:04:32.246-0500:
XaResourceManager[c:\neo4j\data\graph.db\nioneo_logical.log]
checkRecoveryComplete 0 xids
2011-12-08 15:04:32.917-0500:
c:\neo4j\data\graph.db\neostore.relationshiptypestore.db.names rebuild id 
generator, highId=19 defragged count=0
2011-12-08 15:04:33.257-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db.index.keys rebuild id 
generator, highId=7 defragged count=0
2011-12-08 15:04:33.497-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db.index rebuild id generator, 
highId=6 defragged count=0
2011-12-08 15:04:33.701-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db.strings rebuild id generator, 
highId=805166 defragged count=0
2011-12-08 15:04:33.867-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db.arrays rebuild id generator, 
highId=1 defragged count=0
2011-12-08 15:04:34.067-0500:
c:\neo4j\data\graph.db\neostore.propertystore.db rebuild id generator,
highId=7635062 defragged count=0
2011-12-08 15:04:34.309-0500:
c:\neo4j\data\graph.db\neostore.relationshipstore.db rebuild id generator,
highId=2052571 defragged count=0
2011-12-08 15:04:34.496-0500: c:\neo4j\data\graph.db\neostore.nodestore.db
rebuild id generator, highId=805167 defragged count=0
2011-12-08 15:04:34.747-0500: c:\neo4j\data\graph.db\neostore rebuild id 
generator, highId=4 defragged count=0
2011-12-08 15:04:34.857-0500:
XaResourceManager[c:\neo4j\data\graph.db\nioneo_logical.log] recovery completed.
2011-12-08 15:04:34.857-0500: Recovery on log 
[c:\neo4j\data\graph.db\nioneo_logical.log.2] completed.
2011-12-08 15:04:34.983-0500: Non clean shutdown detected on log 
[c:\neo4j\data\graph.db\index\lucene.log.2]. Recovery started ...
2011-12-08 15:04:34.984-0500: [c:\neo4j\data\graph.db\index\lucene.log.2]
logVersion=20 with committed tx=2858191
2011-12-08 15:07:34.590-0500: [c:\neo4j\data\graph.db\index\lucene.log.2]
entries found=13711 lastEntryPos=535043
2011-12-08 15:07:34.591-0500: Internal recovery completed, scanned 13711 log 
entries. Recovered 3428 transactions. Last tx recovered: 2861619
2011-12-08 15:07:34.591-0500:
XaResourceManager[c:\neo4j\data\graph.db\index\lucene.log] sorting 1 xids
2011-12-08 15:07:34.652-0500:
XaResourceManager[c:\neo4j\data\graph.db\index\lucene.log]
checkRecoveryComplete 0 xids
2011-12-08 15:07:34.652-0500:
XaResourceManager[c:\neo4j\data\graph.db\index\lucene.log] 

Re: [Neo4j] println and Table Projections

2011-12-07 Thread Romiko Derbynew
Hi,

Thanks for the tips, will see if I can change the client to use the new format. 
Indeed, let me try isolate the problems with more simpler queries. I have built 
a test case below, forgive me if I made it to complex.

Friend = HasPet = Pet = HasCareTaker = CareTaker
Friend = HasPet = Pet = HasCareTaker = CareTaker
Friend

Test Case Script Setup
props = [:];rootNode= g.addVertex(props);props[Name] = John;friendNode1 = 
g.addVertex(props);myRelation = g.addEdge(rootNode, friendNode1, 
'AllFriends');props[Name] = Jack;friendNode2 = 
g.addVertex(props);myRelation = g.addEdge(rootNode, friendNode2, 
'AllFriends');props[Name] = Jill;friendNode3 = 
g.addVertex(props);myRelation = g.addEdge(rootNode, friendNode3, 
'AllFriends');props[Name] = ScoobieDoo;petNode1 = 
g.addVertex(props);myRelation = g.addEdge(friendNode1, 
petNode1,'HasPet');props[Name] = Garfield;petNode2 = 
g.addVertex(props);myRelation = g.addEdge(friendNode2, 
petNode2,'HasPet');props[Name] = Bob;careTakerNode1 = 
g.addVertex(props);myRelation = g.addEdge(petNode1, 
careTakerNode1,'HasCareTaker');props[Name] = Harry;careTakerNode2 = 
g.addVertex(props);myRelation = g.addEdge(petNode2, 
careTakerNode2,'HasCareTaker')

Query - Works, but does not have Jill in the table.
rootNode.out('AllFriends').as('Friend').ifThenElse{it.out('HasPet').hasNext()}{it.out('HasPet')}{it}.as('Pet').out('HasCareTaker').as('CareTaker').table(new
 Table()){it['Name']}{it['Name']}{it['Name']}.cap

Output
[[Friend:Jack, Pet:Garfield, CareTaker:Harry], [Friend:John, Pet:ScoobieDoo, 
CareTaker:Bob]]

Attempted Query - Does not work - trying to get Jill (Notice I am trying to use 
println)
rootNode.out('AllFriends').as('Friend').ifThenElse{it.out('HasPet').hasNext()}{it.out('HasPet')}{println
 ${it} Unknown}.as('Pet').out('HasCareTaker').as('CareTaker').table(new 
Table()){it['Name']}{it['Name']}{it['Name']}.cap

Desired Output
[[Friend:Jack, Pet:Garfield, CareTaker:Harry], [Friend:John, Pet:ScoobieDoo, 
CareTaker:Bob], [Friend:Jill, Pet:unknown, CareTaker:unknown]]]

If I can get this working, it means we can have allot more performance from 
queries without doing separate queries if we have a powerful table projection 
model, since I rely on the REST API, I feel the table projections is going to 
be our core method of joining results in one call, so the idea of left/right 
joins etc.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko Rodriguez
Sent: Wednesday, 7 December 2011 7:07 PM
To: Neo4j user discussions
Cc: ne...@googlegroups.com
Subject: Re: [Neo4j] println and Table Projections

Hi,

Peter brings up a good point. Its hard for us to parse complex queries and see 
where Exceptions are happening. If you can isolate the problem via a simpler 
traversal, that would be best for us -- and our little baby brains.

Also, note the following syntax optimizations for your traversal:
1. outE[[label:'HOSTS']].inV --- out('HOSTS')
2. Similarly, inE[[label:'X']].outV - in('X')

Using out() and in() is much more efficient (faster) and more concise. Unless 
you plan to reason on the properties of an edge, then there is no reason to use 
outE.inV style syntax as out will do the full vertex-to-vertex jump for you.

HTH,
Marko.

http://markorodriguez.com

On Dec 7, 2011, at 1:00 AM, Peter Neubauer wrote:

 Mmh,
 I was thinking on how to return the contents of the output stream, I 
 am not quite sure how to return that. What woudl be a good format for 
 you?
 
 Also could you reduce this into a small testcase that I can work on?
 
 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 Wed, Dec 7, 2011 at 8:10 AM, Romiko Derbynew 
 romiko.derby...@readify.net wrote:
 Hi,
 
 I have this statement.
 g.v('0').outE[[label:'HOSTS']].inV.filter{ 
 it['Key'].equalsIgnoreCase('romikoagency') 
 }.inE[[label:'USER_BELONGS_TO']].outV.filter{ 
 it['Username'].equalsIgnoreCase('romiko.derbynew') 
 }.ifThenElse{it.outE[[label:'USER_LINKED_TO_CENTRE']].inV.hasNext()}{
 it.outE[[label:'USER_LINKED_TO_CENTRE']].inV.Name}{println ${it} 
 Unknown}.as('Centre')
 
 I then take this query and do a table projection, however I get the 
 following error.
 println java.lang.String cannot be cast to 
 com.tinkerpop.blueprints.pgm.Vertex
 
 Is there a better way to do this then? I want to reduce our calls to the DB 
 for performance and finding it a bit tough wrapping everything into one  
 query. Currently the above query is split into two different queries.
 
 Much appreciated.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 ___
 Neo4j mailing list
 User@lists.neo4j.org

[Neo4j] Neo4jClient - Query optmised

2011-12-07 Thread Romiko Derbynew
Finally thanks to Peter and Marko, the .Net Neo4jClient code has been optimised 
to use short hand version of in('') and out('').
ChangeSet is http://hg.readify.net/neo4jclient/changeset/91ef447a9053
___
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


[Neo4j] IfTheElese - .Net GraphClient

2011-12-06 Thread Romiko Derbynew
Hi Guys,

IfThenElse is now supported with the Neo4jClient. Below are some examples, it 
supports nested declarations and parameters.

https://gist.github.com/1437793

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


[Neo4j] Help needed - Gremlin IfThenElse and As Clause with Table Projections - Cap

2011-12-06 Thread Romiko Derbynew
Hi,

I am trying to write a query that does a table projection, however, there is 
two nested ifthenelse statements. I find that the As clause does not work 
correctly when I mark the iterator and I cannot find a way to get a consistent 
projection.

Ideally. Each THEN statement should contribute to the projection, but this does 
not occur.

I think perhaps the problem is in my ELSE conditions, where I would need to 
created fake nodes for the AS Statements to work with null values when 
deserializing. Any ideas?

Below is two sample Gremlin, and .Net c# equivalent and then the REST outputs. 
(NOTE there is a bug with table projectons in gremlin, and column order is 
reversed from data, but I can work around this. 
https://github.com/neo4j/community/issues/114)

This script is try to get nodes and if those nodes have further relationships 
then go get those nodes and mark them with AS statements and if those nodes 
have relationships, then mark those end nodes with as statements, and then put 
them all in a table

So I imagine the table like this if there were 3 levels deep, and one property 
per node to project

Sample desired output if there is 3 nodes at level 0, 1 node at level 2 and 1 
node at level 3.
Column1 Column2 Column3
PropertyA, null, null
PropertyA, PropertyB, null
PropertyA, PropertyB, PropetyC


e.g.

g.v('0').outE[[label:'HOSTS']].inV.filter{ 
it['Key'].equalsIgnoreCase('romikoagency') 
}.inE[[label:'USER_BELONGS_TO']].outV.filter{ 
it['Username'].equalsIgnoreCase('romiko.derbynew') 
}.outE[[label:'USER_LINKED_TO_CENTRE']].inV.as('Centre').inE[[label:'USER_LINKED_TO_CENTRE']].outV.as('UserGivenName').as('UserFamilyName').inE[[label:'CREATED_BY']].outV.filter{
 it['Completed'] == false }.as('ReferralId')

.ifThenElse{it.outE[[label:'REFERRAL_HAS_WHO_SECTION']].inV.hasNext()}
{it.outE[[label:'REFERRAL_HAS_WHO_SECTION']].inV
.as('ReferralDate')
.ifThenElse{it.outE[[label:'HAS_PARTICIPANT']].inV.hasNext()}
{it.outE[[label:'HAS_PARTICIPANT']].inV.inE[[label:'HAS_PARTICIPANT']].outV.inE[[label:'REFERRAL_HAS_WHO_SECTION']].outV.filter
{ it['Completed'] == false }
.as('ParticipantDisplayOrder')
.as('ParticipantName')}
{it}}
{it}
.table(new 
Table()){it['Name']}{it['FamilyName']}{it['GivenName']}{it['UniqueId']}{it['ReferralDate']}{it['Name']}{it['DisplayOrder']}.cap


var incompleteReferrals = graphClient
.RootNode
.OutAgency(Hosts.TypeKey, a = a.Key == 
userIdentifier.AgencyKey)
.InUser(UserBelongsTo.TypeKey, u = u.Username == 
userIdentifier.Username)
.OutCentre(UserLinkedToCentre.TypeKey)
.As(Centre)
.InUser(UserLinkedToCentre.TypeKey)
.As(UserGivenName)
.As(UserFamilyName)
.InReferral(CreatedBy.TypeKey, r = r.Completed == false)
.As(ReferralId)
.IfThenElse(new 
GremlinIterator().OutReferralWhoSection(ReferralHasWhoSection.TypeKey).GremlinHasNext(),
new 
GremlinIterator().OutReferralWhoSection(ReferralHasWhoSection.TypeKey)
.As(ReferralDate)
.IfThenElse(new 
GremlinIterator().OutReferralParticipant(HasParticipant.TypeKey).GremlinHasNext(),
new 
GremlinIterator().OutReferralParticipant(HasParticipant.TypeKey)
.InReferralWhoSection(HasParticipant.TypeKey)
.InReferral(ReferralHasWhoSection.TypeKey, r = 
r.Completed == false)
.As(ParticipantDisplayOrder)
.As(ParticipantName)
,
 new GremlinIterator())
,
 new GremlinIterator())
.TableReferralByGroup, Centre, User, User, Referral, 
ReferralWhoSection, ReferralParticipant, ReferralParticipant(
centre = centre.Name,
user = user.FamilyName,
user = user.GivenName,
referral = referral.UniqueId,
who = who.ReferralDate,
participant = participant.Name,
participant = participant.DisplayOrder
);


Output:
[ [ {
  data : [ [ Centre2, Derbynew, Romiko, 402 ], [ null, null, 
null, null ], [ null, Romiko, null, null ], [ Centre2, null, 
null, null ], [ null, null, null, null ], [ null, null, 
Derbynew, null ], [ 11, null, null, null ], [ Centre2, Derbynew, 
Romiko, 371 ], [ null, null, null, null ], [ null, Bob, null, 
null ], [ Centre, null, null, null ], [ null, null, null, 
null ], [ null, null, Builder, null ], [ 1, null, null, null ], 
[ Centre, Builder, Bob, 31 ], [ null, null, null, null ], [ 
null, Bob, null, null ], [ Centre, null, null, null ], [ 
null, null, null, null ], [ null, null, Builder, null ], [ 1, 
null, null, null ], [ Centre, Builder, Bob, 81 ], [ null, null, 
null, null ], [ null, Bob, 

Re: [Neo4j] Help needed - Gremlin IfThenElse and As Clause with Table Projections - Cap

2011-12-06 Thread Romiko Derbynew
, Derbynew, Romiko, 402 ], [ null, null, null, 
null ], [ null, Romiko, null, null ], [ Centre, null, null, 
null ], [ null, null, null, null ], [ null, null, Derbynew, 
null ], [ 1, null, null, null ], [ Centre, Derbynew, Romiko, 371 
], [ null, null, null, null ] ],
  columns : [ Centre, UserFamilyName, UserGivenName, ReferralId ]
} ] ]


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Romiko Derbynew
Sent: Wednesday, 7 December 2011 3:14 PM
To: Neo4j user discussions (user@lists.neo4j.org)
Subject: [Neo4j] Help needed - Gremlin IfThenElse and As Clause with Table 
Projections - Cap

Hi,

I am trying to write a query that does a table projection, however, there is 
two nested ifthenelse statements. I find that the As clause does not work 
correctly when I mark the iterator and I cannot find a way to get a consistent 
projection.

Ideally. Each THEN statement should contribute to the projection, but this does 
not occur.

I think perhaps the problem is in my ELSE conditions, where I would need to 
created fake nodes for the AS Statements to work with null values when 
deserializing. Any ideas?

Below is two sample Gremlin, and .Net c# equivalent and then the REST outputs. 
(NOTE there is a bug with table projectons in gremlin, and column order is 
reversed from data, but I can work around this. 
https://github.com/neo4j/community/issues/114)

This script is try to get nodes and if those nodes have further relationships 
then go get those nodes and mark them with AS statements and if those nodes 
have relationships, then mark those end nodes with as statements, and then put 
them all in a table

So I imagine the table like this if there were 3 levels deep, and one property 
per node to project

Sample desired output if there is 3 nodes at level 0, 1 node at level 2 and 1 
node at level 3.
Column1 Column2 Column3
PropertyA, null, null
PropertyA, PropertyB, null
PropertyA, PropertyB, PropetyC


e.g.

g.v('0').outE[[label:'HOSTS']].inV.filter{ 
it['Key'].equalsIgnoreCase('romikoagency') 
}.inE[[label:'USER_BELONGS_TO']].outV.filter{ 
it['Username'].equalsIgnoreCase('romiko.derbynew') 
}.outE[[label:'USER_LINKED_TO_CENTRE']].inV.as('Centre').inE[[label:'USER_LINKED_TO_CENTRE']].outV.as('UserGivenName').as('UserFamilyName').inE[[label:'CREATED_BY']].outV.filter{
 it['Completed'] == false }.as('ReferralId')

.ifThenElse{it.outE[[label:'REFERRAL_HAS_WHO_SECTION']].inV.hasNext()}
{it.outE[[label:'REFERRAL_HAS_WHO_SECTION']].inV
.as('ReferralDate')
.ifThenElse{it.outE[[label:'HAS_PARTICIPANT']].inV.hasNext()}
{it.outE[[label:'HAS_PARTICIPANT']].inV.inE[[label:'HAS_PARTICIPANT']].outV.inE[[label:'REFERRAL_HAS_WHO_SECTION']].outV.filter
{ it['Completed'] == false }
.as('ParticipantDisplayOrder')
.as('ParticipantName')}
{it}}
{it}
.table(new 
Table()){it['Name']}{it['FamilyName']}{it['GivenName']}{it['UniqueId']}{it['ReferralDate']}{it['Name']}{it['DisplayOrder']}.cap


var incompleteReferrals = graphClient
.RootNode
.OutAgency(Hosts.TypeKey, a = a.Key == 
userIdentifier.AgencyKey)
.InUser(UserBelongsTo.TypeKey, u = u.Username == 
userIdentifier.Username)
.OutCentre(UserLinkedToCentre.TypeKey)
.As(Centre)
.InUser(UserLinkedToCentre.TypeKey)
.As(UserGivenName)
.As(UserFamilyName)
.InReferral(CreatedBy.TypeKey, r = r.Completed == false)
.As(ReferralId)
.IfThenElse(new 
GremlinIterator().OutReferralWhoSection(ReferralHasWhoSection.TypeKey).GremlinHasNext(),
new 
GremlinIterator().OutReferralWhoSection(ReferralHasWhoSection.TypeKey)
.As(ReferralDate)
.IfThenElse(new 
GremlinIterator().OutReferralParticipant(HasParticipant.TypeKey).GremlinHasNext(),
new 
GremlinIterator().OutReferralParticipant(HasParticipant.TypeKey)
.InReferralWhoSection(HasParticipant.TypeKey)
.InReferral(ReferralHasWhoSection.TypeKey, r = 
r.Completed == false)
.As(ParticipantDisplayOrder)
.As(ParticipantName)
,
 new GremlinIterator())
,
 new GremlinIterator())
.TableReferralByGroup, Centre, User, User, Referral, 
ReferralWhoSection, ReferralParticipant, ReferralParticipant(
centre = centre.Name,
user = user.FamilyName,
user = user.GivenName,
referral = referral.UniqueId,
who = who.ReferralDate,
participant = participant.Name,
participant = participant.DisplayOrder
);


Output:
[ [ {
  data : [ [ Centre2, Derbynew, Romiko, 402 ], [ null

Re: [Neo4j] Help needed - Gremlin IfThenElse and As Clause with Table Projections - Cap

2011-12-06 Thread Romiko Derbynew
Current workaround is 3 db calls, and then I merge the results and take the 
most significant, but this is very slow.

var incompleteReferralsWithParticipants = graphClient
.RootNode
.OutAgency(Hosts.TypeKey, a = a.Key == 
userIdentifier.AgencyKey)
.InUser(UserBelongsTo.TypeKey, u = u.Username == 
userIdentifier.Username)
.OutCentre(UserLinkedToCentre.TypeKey)
.As(Centre)
.InUser(UserLinkedToCentre.TypeKey)
.As(UserGivenName)
.As(UserFamilyName)
.InReferral(CreatedBy.TypeKey, r = r.Completed == false)
.As(ReferralId)
.OutReferralWhoSection(ReferralHasWhoSection.TypeKey)
.As(ReferralDate)
.OutReferralParticipant(HasParticipant.TypeKey)
.As(ParticipantDisplayOrder)
.As(ParticipantName)
.TableReferralByGroup, Centre, User, User, Referral, 
ReferralWhoSection, ReferralParticipant, ReferralParticipant(
centre = centre.Name,
user = user.FamilyName,
user = user.GivenName,
referral = referral.UniqueId,
who = who.ReferralDate,
participant = participant.Name,
participant = participant.DisplayOrder
);

var allIncompleteReferralsWhoSection = graphClient
.RootNode
.OutAgency(Hosts.TypeKey, a = a.Key == 
userIdentifier.AgencyKey)
.InUser(UserBelongsTo.TypeKey, u = u.Username == 
userIdentifier.Username)
.OutCentre(UserLinkedToCentre.TypeKey)
.As(Centre)
.InUser(UserLinkedToCentre.TypeKey)
.As(UserGivenName)
.As(UserFamilyName)
.InReferral(CreatedBy.TypeKey, r = r.Completed == false)
.As(ReferralId)
.OutReferralWhoSection(ReferralHasWhoSection.TypeKey)
.As(ReferralDate)
.TableReferralByGroup, Centre, User, User, Referral, 
ReferralWhoSection(
centre = centre.Name,
user = user.FamilyName,
user = user.GivenName,
referral = referral.UniqueId,
who = who.ReferralDate
);

var allIncompleteReferrals = graphClient
.RootNode
.OutAgency(Hosts.TypeKey, a = a.Key == 
userIdentifier.AgencyKey)
.InUser(UserBelongsTo.TypeKey, u = u.Username == 
userIdentifier.Username)
.OutCentre(UserLinkedToCentre.TypeKey)
.As(Centre)
.InUser(UserLinkedToCentre.TypeKey)
.As(UserGivenName)
.As(UserFamilyName)
.InReferral(CreatedBy.TypeKey, r = r.Completed == false)
.As(ReferralId)
.TableReferralByGroup, Centre, User, User, Referral(
centre = centre.Name,
user = user.FamilyName,
user = user.GivenName,
referral = referral.UniqueId
);

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Romiko Derbynew
Sent: Wednesday, 7 December 2011 3:34 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Help needed - Gremlin IfThenElse and As Clause with Table 
Projections - Cap

I also tried this, with as statements in the else statements, I am noticing I 
cannot get access to the nest ifthenelse as data in the table projection, will 
try other ways of doing it in the meantime.

g.v('0').outE[[label:'HOSTS']].inV.filter{ 
it['Key'].equalsIgnoreCase('romikoagency') 
}.inE[[label:'USER_BELONGS_TO']].outV.filter{ 
it['Username'].equalsIgnoreCase('romiko.derbynew') 
}.outE[[label:'USER_LINKED_TO_CENTRE']].inV.as('Centre').inE[[label:'USER_LINKED_TO_CENTRE']].outV.as('UserGivenName').as('UserFamilyName').inE[[label:'CREATED_BY']].outV.filter{
 it['Completed'] == false 
}.as('ReferralId').ifThenElse{it.outE[[label:'REFERRAL_HAS_WHO_SECTION']].inV.hasNext()}{it.outE[[label:'REFERRAL_HAS_WHO_SECTION']].inV.as('ReferralDate').ifThenElse{it.outE[[label:'HAS_PARTICIPANT']].inV.hasNext()}{it.outE[[label:'HAS_PARTICIPANT']].inV.as('ParticipantDisplayOrder').as('ParticipantName')}{it.as('ParticipantDisplayOrder').as('ParticipantName')}}{it.as('ReferralDate')}.table(new
 
Table()){it['Name']}{it['FamilyName']}{it['GivenName']}{it['UniqueId']}{it['ReferralDate']}{it['Name']}{it['DisplayOrder']}.cap


var incompleteReferrals = graphClient
.RootNode
.OutAgency(Hosts.TypeKey, a = a.Key == 
userIdentifier.AgencyKey)
.InUser(UserBelongsTo.TypeKey, u = u.Username == 
userIdentifier.Username)
.OutCentre(UserLinkedToCentre.TypeKey

[Neo4j] println and Table Projections

2011-12-06 Thread Romiko Derbynew
Hi,

I have this statement.
g.v('0').outE[[label:'HOSTS']].inV.filter{ 
it['Key'].equalsIgnoreCase('romikoagency') 
}.inE[[label:'USER_BELONGS_TO']].outV.filter{ 
it['Username'].equalsIgnoreCase('romiko.derbynew') 
}.ifThenElse{it.outE[[label:'USER_LINKED_TO_CENTRE']].inV.hasNext()}{it.outE[[label:'USER_LINKED_TO_CENTRE']].inV.Name}{println
 ${it} Unknown}.as('Centre')

I then take this query and do a table projection, however I get the following 
error.
println java.lang.String cannot be cast to com.tinkerpop.blueprints.pgm.Vertex

Is there a better way to do this then? I want to reduce our calls to the DB for 
performance and finding it a bit tough wrapping everything into one  query. 
Currently the above query is split into two different queries.

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


Re: [Neo4j] Aggregates inside copySplit()

2011-12-05 Thread Romiko Derbynew
Hi Peter,

That sounds like a nice idea for sure :)

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Monday, 5 December 2011 5:31 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Aggregates inside copySplit()

Wohow,
cool work Romiko! I would love a screencast on this from the .NET side!

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 Mon, Dec 5, 2011 at 6:34 AM, Romiko Derbynew romiko.derby...@readify.net 
wrote:
 Hi Marko,

 Working nicely now :)

 Here is how it looks on our client. I am not sure if I can call _() an 
 identityPipe, any inspiration here? I had to use Aggregate here, instead of 
 Store(), else the Except does not work.

 var results = graphClient
                .RootNode
                .CopySplit(
                    new IdentityPipe()
                        .OutAgency(Hosts.TypeKey, a = a.Key == 
 userIdentifier.AgencyKey)
                        .InUser(UserBelongsTo.TypeKey)
                        .OutCentre(UserLinkedToCentre.TypeKey)
                        .InUser(UserLinkedToCentre.TypeKey)
                        .InReferral(CreatedBy.TypeKey, r = 
 r.Completed == false)
                        .AggregateVReferral(ReferralWithCentres),
                    new IdentityPipe()
                        .OutAgency(Hosts.TypeKey, a = a.Key == 
 userIdentifier.AgencyKey)
                )
                .FairMerge()
                .InReferral(ReferralBelongsTo.TypeKey, r = 
 r.Completed == false)
                .As(ReferralId)
                .ExceptVReferral(ReferralWithCentres)
                .GremlinDistinct()
                .OutUser(CreatedBy.TypeKey)
                .As(UserGivenName)
                .As(UserFamilyName)
                .TableReferralByGroup, Referral, User, User(
                    referral = referral.UniqueId,
                    user = user.FamilyName,
                    user = user.GivenName
                );

 Which generates this optimised query.
 ReferralWithCentres = 
 [];g.v(p0)._.copySplit(_().outE[[label:p1]].inV.filter{ 
 it[p2].equalsIgnoreCase(p3) 
 }.inE[[label:p4]].outV.outE[[label:p5]].inV.inE[[label:p6]].outV.inE[[
 label:p7]].outV.filter{ it[p8] == p9 }.aggregate(ReferralWithCentres), 
 _().outE[[label:p10]].inV.filter{ it[p11].equalsIgnoreCase(p12) 
 }).fairMerge.inE[[label:p13]].outV.filter{ it[p14] == p15 
 }.as(p16).except(ReferralWithCentres).uniqueObject().outE[[label:p17]]
 .inV.as(p18).as(p19).table(new Table()){it[p20]}{it[p21]}{it[p22]}.cap

 Thanks again for all the help :)

 -Original Message-
 From: user-boun...@lists.neo4j.org 
 [mailto:user-boun...@lists.neo4j.org] On Behalf Of Marko A. Rodriguez
 Sent: Sunday, 4 December 2011 4:09 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Aggregates inside copySplit()

 Hey,

 That will probably give you unwanted behavior as aggregate is a greedy step. 
 If you just want to lazily store and not aggregate then:

  Gremlin 1.3:   sideEffect{x.add(it)}
  Gremlin 1.4:   store(x)

 HTH,
 Marko.

 http://markorodriguez.com

 On Dec 3, 2011, at 8:50 PM, Romiko Derbynew romiko.derby...@readify.net 
 wrote:

 Sorry, forgot to complete question. So I use a 
 x=[];g.v(0).out.copySplit(_().out.aggregate(x), 
 _().out).fairMerge().out.retain(x). I guess this is not possible, where a 
 retain clause is used after a fairMerge()?

 -Original Message-
 From: user-boun...@lists.neo4j.org 
 [mailto:user-boun...@lists.neo4j.org] On Behalf Of Romiko Derbynew
 Sent: Sunday, 4 December 2011 2:38 PM
 To: Neo4j user discussions (user@lists.neo4j.org)
 Subject: [Neo4j] Aggregates inside copySplit()

 Hi,

 Is it possible to use aggregates within a copySplit pipe?
 ___
 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


Re: [Neo4j] Aggregates inside copySplit()

2011-12-05 Thread Romiko Derbynew
Hi Marko,

Indeed, I think I get it now, in what scenarios would you use a non greedy  
collection and how would you know when that collection has be filled, I guess 
you would not want to query a collection that is still busy filling up in the 
background?

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko Rodriguez
Sent: Tuesday, 6 December 2011 2:32 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Aggregates inside copySplit()

Hi,

 I had to use Aggregate here, instead of Store(), else the Except does not 
 work.

The except() does work, but you have you understand how it works with respects 
to the semantics of aggregate() and store().

store = lazily store objects in the pipeline to some collection x
aggregate = greedily aggregate objects in the pipeline to some 
collection x before moving onto the next step.

So, except's excepted collection will be growing over time. However, with 
aggregate(), its collection is stable as it has already been greedily filled. 
Get it?

 I am not sure if I can call _() an identityPipe, any inspiration here?


You mean between the two as()? Why not?

Enjoy,
Marko.

http://markorodriguez.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


Re: [Neo4j] Gremlin Query - Help

2011-12-05 Thread Romiko Derbynew
Marko,

I am thinking of using this statement.
g.V.ifThenElse{it.out('hasCentre').filter{it == aCentre}.hasNext()}{}{println 
${it} has center unknown}

to get nodes that DO NOT have a relationship, is this the best way to do it? I 
guess so, if this is the case, I am now adding support to the .NET graph client 
to support ifThenElse expressions. I am wondering though, as I am designing the 
interface for it, can and ifThenElse have nested ifThenElse expressions as 
well? I guess it and _() can be used within them?

Cheers

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko Rodriguez
Sent: Saturday, 3 December 2011 4:10 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Gremlin Query - Help

Hi,

 Scenario 1:
 I would like to get all Nodes that do not have a relationship to another 
 node. What is the best way to do this Gremlin?
 
 Root = NodeA = NodeB
 Root = NodeC
 
 Output should be NodeC

I don't understand the problem.

 Scenario 2:
 Root =  User - Centre
 
 I would like to get all centres for userA, and then get all users who 
 are also linked to the same centres of the userA

userA.out('hasCentre').in('hasCentre').except([userA])

 Scenario 3:
 User = Centre
 I would like to get all users that do not have a link to a Centre, and if 
 this is the case, do a projection that returns a fake centre with property 
 Unknown

g.V.ifThenElse{it.out('hasCentre').filter{it == 
aCentre}.hasNext()}{}{println ${it} has center unknown}

If you have an index of your Users, then its more efficient to hit that index, 
then iterate through all vertices (g.V). E.g.

g.idx(T.v)[[type:'User']].ifThenElse

 Scenario 4:
 
 REFERRAL = PERSON
 
 I would like to combine a query that gets all Referrals that are 
 linked to a person and project a table result (contains referrals and 
 person property values (this is easy to do) However, I then want to do a 
 SPLIT query, that gets referrals without the persons, and then MERGE both 
 back into the table projection? So table projecton might look like this.
 I guess this is done with .table().it{}cap, but what I am not sure, is 
 how to do a split and merge in parallel and then get that merge projected 
 into the same table.


I don't quite understand your problem, but here is an example of splitting and 
merging.

g.v(1).out('knows').copySplit(_().out('knows').name, 
_().out('created').name).fairMerge

This will get all the people that v[1] knows and then generate two parallel 
pipeline. Each friend of v[1] is copied to each of the 2 parallel pipelines. 
One pipeline will get their friend's names and one will get their created 
project's names. It will then merge those two parallel pipelines into a single 
stream. You can do either fairMerge or exhaustMerge depending on the merging 
algorithm you want. fairMerge is more memory efficient. I need to write more 
about split/merge in the Gremlin documentation.

https://github.com/tinkerpop/gremlin/wiki/Split-Merge-Pattern -- will 
work on it :)

HTH,
Marko.

http://markorodriguez.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


Re: [Neo4j] Gremlin/Groovy UNIQUE + Closure support

2011-12-04 Thread Romiko Derbynew
Hi Sure,

Here is two examples, raw and Neo4jClient.

https://gist.github.com/1431189

Currently I am using uniqueObject() as Marko suggested. In the Neo4jClient I 
have called the extension GremlinDistinct.

Cheers

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Sunday, 4 December 2011 7:21 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Gremlin/Groovy UNIQUE + Closure support

Guys,
I can include a dedup example in the gremlin plugin docs if you Romiko give me 
a small nice example? Will upgrade when Gremlin 1.4 us out...

/peter

Sent from my phone, please excuse typos and autocorrection.
On Dec 4, 2011 12:52 AM, Marko Rodriguez okramma...@gmail.com wrote:

 Hi,

 uniqueObject is in Gremlin 1.3 and below. The online docs are for 
 Gremlin
 1.4 and uniqueObject is now called dedup. To see the Gremlin 1.3 
 documentation, see the wiki/ directory of the distribution.

 HTH,
 Marko.

 http://markorodriguez.com

 On Dec 3, 2011 4:13 PM, Romiko Derbynew 
 romiko.derby...@readify.net
 wrote:

 Hi Marko,

 Thank you very much for this information, is it possible that the 
 documentation will include these gremlin methods, since on the 
 Gremlin-Steps page, I failed to notice any mention of UniqueObject()? 
 I am now updating the .NetClient asap :) Thank you once again!


 -Original Message-
 From: user-boun...@lists.neo4j.org 
 [mailto:user-boun...@lists.neo4j.org
 ]...
 ___
 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] Aggregates inside copySplit()

2011-12-04 Thread Romiko Derbynew
Excellent, Adding this to the Neo4jClient. 

Marko much appreciated, what exactly is the difference regarding aggregate and 
store, possible to expand further on greedy, I am interested to learn more 
about the inner workings of Gremlin?

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko A. Rodriguez
Sent: Sunday, 4 December 2011 4:09 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Aggregates inside copySplit()

Hey,

That will probably give you unwanted behavior as aggregate is a greedy step. If 
you just want to lazily store and not aggregate then:

  Gremlin 1.3:   sideEffect{x.add(it)}
  Gremlin 1.4:   store(x)

HTH,
Marko.

http://markorodriguez.com

On Dec 3, 2011, at 8:50 PM, Romiko Derbynew romiko.derby...@readify.net wrote:

 Sorry, forgot to complete question. So I use a 
 x=[];g.v(0).out.copySplit(_().out.aggregate(x), 
 _().out).fairMerge().out.retain(x). I guess this is not possible, where a 
 retain clause is used after a fairMerge()?
 
 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
 Behalf Of Romiko Derbynew
 Sent: Sunday, 4 December 2011 2:38 PM
 To: Neo4j user discussions (user@lists.neo4j.org)
 Subject: [Neo4j] Aggregates inside copySplit()
 
 Hi,
 
 Is it possible to use aggregates within a copySplit pipe?
 ___
 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


Re: [Neo4j] Aggregates inside copySplit()

2011-12-04 Thread Romiko Derbynew
Hi Marko,

Working nicely now :)

Here is how it looks on our client. I am not sure if I can call _() an 
identityPipe, any inspiration here? I had to use Aggregate here, instead of 
Store(), else the Except does not work.

var results = graphClient
.RootNode
.CopySplit(
new IdentityPipe()
.OutAgency(Hosts.TypeKey, a = a.Key == 
userIdentifier.AgencyKey)
.InUser(UserBelongsTo.TypeKey)
.OutCentre(UserLinkedToCentre.TypeKey)
.InUser(UserLinkedToCentre.TypeKey)
.InReferral(CreatedBy.TypeKey, r = r.Completed == 
false)
.AggregateVReferral(ReferralWithCentres),
new IdentityPipe()
.OutAgency(Hosts.TypeKey, a = a.Key == 
userIdentifier.AgencyKey)
)
.FairMerge()
.InReferral(ReferralBelongsTo.TypeKey, r = r.Completed == 
false)
.As(ReferralId)
.ExceptVReferral(ReferralWithCentres)
.GremlinDistinct()
.OutUser(CreatedBy.TypeKey)
.As(UserGivenName)
.As(UserFamilyName)
.TableReferralByGroup, Referral, User, User(
referral = referral.UniqueId,
user = user.FamilyName,
user = user.GivenName
);

Which generates this optimised query.
ReferralWithCentres = [];g.v(p0)._.copySplit(_().outE[[label:p1]].inV.filter{ 
it[p2].equalsIgnoreCase(p3) 
}.inE[[label:p4]].outV.outE[[label:p5]].inV.inE[[label:p6]].outV.inE[[label:p7]].outV.filter{
 it[p8] == p9 }.aggregate(ReferralWithCentres), 
_().outE[[label:p10]].inV.filter{ it[p11].equalsIgnoreCase(p12) 
}).fairMerge.inE[[label:p13]].outV.filter{ it[p14] == p15 
}.as(p16).except(ReferralWithCentres).uniqueObject().outE[[label:p17]].inV.as(p18).as(p19).table(new
 Table()){it[p20]}{it[p21]}{it[p22]}.cap

Thanks again for all the help :)

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko A. Rodriguez
Sent: Sunday, 4 December 2011 4:09 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Aggregates inside copySplit()

Hey,

That will probably give you unwanted behavior as aggregate is a greedy step. If 
you just want to lazily store and not aggregate then:

  Gremlin 1.3:   sideEffect{x.add(it)}
  Gremlin 1.4:   store(x)

HTH,
Marko.

http://markorodriguez.com

On Dec 3, 2011, at 8:50 PM, Romiko Derbynew romiko.derby...@readify.net wrote:

 Sorry, forgot to complete question. So I use a 
 x=[];g.v(0).out.copySplit(_().out.aggregate(x), 
 _().out).fairMerge().out.retain(x). I guess this is not possible, where a 
 retain clause is used after a fairMerge()?
 
 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
 Behalf Of Romiko Derbynew
 Sent: Sunday, 4 December 2011 2:38 PM
 To: Neo4j user discussions (user@lists.neo4j.org)
 Subject: [Neo4j] Aggregates inside copySplit()
 
 Hi,
 
 Is it possible to use aggregates within a copySplit pipe?
 ___
 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


Re: [Neo4j] Gremlin/Groovy UNIQUE + Closure support

2011-12-03 Thread Romiko Derbynew
Hi Marko,

Thank you very much for this information, is it possible that the documentation 
will include these gremlin methods, since on the Gremlin-Steps page, I failed 
to notice any mention of UniqueObject()? I am now updating the .NetClient asap 
:) Thank you once again!

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko Rodriguez
Sent: Sunday, 4 December 2011 3:08 AM
To: Neo4j user discussions
Cc: 'mystory-develop...@barnardos.org.au'
Subject: Re: [Neo4j] Gremlin/Groovy UNIQUE + Closure support

Hi,

unique() is a Groovy construct, not a Gremlin construct. The Gremlin equivalent 
is uniqueObject(). And, in Gremlin 1.4, being released next week, its called 
dedup(). Gremlin constructs Pipelines in the backend (toString() an 
expression). If you drop out of pipeline construction by moving to a Groovy 
iterator method, then the pipeline is gone.

https://github.com/tinkerpop/gremlin/wiki/Gremlin-Steps 
(note that this is being updated for Gremlin 1.4 and a few 
names have changed)
(refer to the distribution /wiki for your versions steps)

HTH,
Marko.

http://markorodriguez.com

On Dec 2, 2011, at 9:13 PM, Romiko Derbynew wrote:

 Hi Guys,
 
 If I do a query with out.as(xyz)...out.unique()..out.tablecap I find that 
 the table projections for the closure do not work and I lose all AS 
 references.
 So to get closure support I do this
 
 Out.unique._().out..table
 
 The above sorts out the closure error, but then I lose my previous as 
 projections, is there a way to ensure _() preserves all my previous pipes and 
 placeholders?
 ___
 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] Aggregates inside copySplit()

2011-12-03 Thread Romiko Derbynew
Hi,

Is it possible to use aggregates within a copySplit pipe?
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Aggregates inside copySplit()

2011-12-03 Thread Romiko Derbynew
Sorry, forgot to complete question. So I use a 
x=[];g.v(0).out.copySplit(_().out.aggregate(x), 
_().out).fairMerge().out.retain(x). I guess this is not possible, where a 
retain clause is used after a fairMerge()?

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Romiko Derbynew
Sent: Sunday, 4 December 2011 2:38 PM
To: Neo4j user discussions (user@lists.neo4j.org)
Subject: [Neo4j] Aggregates inside copySplit()

Hi,

Is it possible to use aggregates within a copySplit pipe?
___
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] Gremlin/Groovy UNIQUE + Closure support

2011-12-02 Thread Romiko Derbynew
Hi Guys,

If I do a query with out.as(xyz)...out.unique()..out.tablecap I find that 
the table projections for the closure do not work and I lose all AS references.
So to get closure support I do this

Out.unique._().out..table

The above sorts out the closure error, but then I lose my previous as 
projections, is there a way to ensure _() preserves all my previous pipes and 
placeholders?
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Gremlin Query - Help

2011-12-02 Thread Romiko Derbynew
Marko,

Thank you very much, I really appreciate it, I will start going through your 
response here. I have also added the copy/split aggregate functionality into 
our Gremlin Client. I was not aware of the if then else as well, will extend 
our client to support this.


Apologise, will explain Scenario One.
I have a User Node that has a relationship LINKED_TO_CENTRE

I would like to get a query that can give me all Users that do not have a 
relationship  LINKED_TO_CENTRE. I was thinking of the Except/Retain pattern for 
this, e.g. get all users as aggregate A then get all users linked  as aggregate 
b  - then use except/retain or something along these lines.

On Another note, is there a way to get unique()._() to preserve all previous 
pipes and placeholders, the reason is I want to use unique() before doing a 
table projection. And unique breaks closures? ( I have a separate post on this 
in the mail list)

Marko, if you interested here is how the .NET code looks like that I am 
currently trying to write to generate a report. Its not yet finished as I need 
to take into consideration your feedback, but I am sure I will get their 
eventually. 
//ToDo Chained 'As' statements are reversed, bug in gremlin plugin with 
chained as - https://github.com/neo4j/community/issues/114
var resultSet = graphClient
.RootNode
.OutAgency(Hosts.TypeKey, a = a.Key == 
userIdentifier.AgencyKey)
.InUser(UserBelongsTo.TypeKey, u = u.Username == 
userIdentifier.Username)
.OutCentre(UserLinkedToCentre.TypeKey)
.As(Centre)
.InUser(UserLinkedToCentre.TypeKey)
//.GremlinDistinct() - breaks pipes for table output
.As(UserGivenName)
.As(UserFamilyName)
.InReferral(CreatedBy.TypeKey, r = r.Completed == false)
.As(ReferralId)
.OutReferralWhoSection(ReferralHasWhoSection.TypeKey)
.As(ReferralDate)
.OutReferralParticipant(HasParticipant.TypeKey)
.As(ParticipantName)
.InReferralWhoSection(HasParticipant.TypeKey)
.InReferral(ReferralHasWhoSection.TypeKey)
//.GremlinDistinct() - breaks pipes for table output
.TableReferralByGroup, Centre, User, User, Referral, Referral, 
ReferralParticipant(
centre = centre.Name,
user = user.FamilyName,
user = user.GivenName,
referral = referral.UniqueId,
referral2 = referral2.DateInitiatedUtc,
participant = participant.Name
);

Thank You
Much appreciated


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko Rodriguez
Sent: Saturday, 3 December 2011 4:10 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Gremlin Query - Help

Hi,

 Scenario 1:
 I would like to get all Nodes that do not have a relationship to another 
 node. What is the best way to do this Gremlin?
 
 Root = NodeA = NodeB
 Root = NodeC
 
 Output should be NodeC

I don't understand the problem.

 Scenario 2:
 Root =  User - Centre
 
 I would like to get all centres for userA, and then get all users who 
 are also linked to the same centres of the userA

userA.out('hasCentre').in('hasCentre').except([userA])

 Scenario 3:
 User = Centre
 I would like to get all users that do not have a link to a Centre, and if 
 this is the case, do a projection that returns a fake centre with property 
 Unknown

g.V.ifThenElse{it.out('hasCentre').filter{it == 
aCentre}.hasNext()}{}{println ${it} has center unknown}

If you have an index of your Users, then its more efficient to hit that index, 
then iterate through all vertices (g.V). E.g.

g.idx(T.v)[[type:'User']].ifThenElse

 Scenario 4:
 
 REFERRAL = PERSON
 
 I would like to combine a query that gets all Referrals that are 
 linked to a person and project a table result (contains referrals and 
 person property values (this is easy to do) However, I then want to do a 
 SPLIT query, that gets referrals without the persons, and then MERGE both 
 back into the table projection? So table projecton might look like this.
 I guess this is done with .table().it{}cap, but what I am not sure, is 
 how to do a split and merge in parallel and then get that merge projected 
 into the same table.


I don't quite understand your problem, but here is an example of splitting and 
merging.

g.v(1).out('knows').copySplit(_().out('knows').name, 
_().out('created').name).fairMerge

This will get all the people that v[1] knows and then generate two parallel 
pipeline. Each friend of v[1] is copied to each of the 2 parallel pipelines. 
One pipeline will get their friend's names and one will get their created 
project's names. It will then merge those two 

Re: [Neo4j] New Bug Logged - Gremlin 114

2011-11-30 Thread Romiko Derbynew
Not too bad, I have a work around in our fluent api to reverse them.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Wednesday, 30 November 2011 7:20 PM
To: Neo4j user discussions
Cc: mystory-develop...@barnardos.org.au
Subject: Re: [Neo4j] New Bug Logged - Gremlin 114

Thanks Romiko,
will look into it first time when I have time. How critical is it for you?

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 Wed, Nov 30, 2011 at 1:31 AM, Romiko Derbynew romiko.derby...@readify.net 
wrote:
 Hi,

 New bugged logged at: https://github.com/neo4j/community/issues/114

 Details below for others to peruse.

 Gremlin Table Projections - Column Order Incorrect when using chained 
 .As('x').As('y')

 EXPECTED Order: Createdy, ReferralGroup, ReferralId, ReferralData

 When AS statements appear next to each other.
 Consider A (WORKS - But not logical - have to reverse order when more than 1 
 AS statement is chained together right after each other for column array to 
 match):
 {script:g.v(0).outE[[label:'HOSTS']].inV.filter{ it.Key == 'romikoagency' 
 }.inE[[label:'USER_BELONGS_TO']].outV.filter{ it.Username == 
 'romiko.derbynew' 
 }.as('CreatedBy').outE[[label:'USER_LINKED_TO_PROGRAM']].inV.as('ReferralGroup').inE[[label:'HAS_SUGGESTED_PROGRAM']].outV.inE[[label:'REFERRAL_HAS_DECISIONS_SECTION']].outV.as('ReferralDate').as('ReferralId').table(new
  Table()){it.Username}{it.Name}{it.UniqueId}{it.DateInitiatedUtc}.cap
 }

 notice: as('ReferralDate').as('ReferralId') and then notice the column 
 order below is opposite this: columns  ReferralId, 
 ReferralDate ]

 Results
 [ [ {
 data : [ [ romiko.derbynew, Testa, 331, 
 /Date(1322007153048+1100)/ ], [ romiko.derbynew, Testa, 321, 
 /Date(1322003375637+1100)/ ]], columns : [ CreatedBy, 
 ReferralGroup, ReferralId, ReferralDate ] } ] ]


 Consider B (Does not work - this is more LOGICAL from gremlin 
 perspective but is bugged, the Chained AS right after each other gets 
 reversed in the column array.) 
 {script:g.v(0).outE[[label:'HOSTS']].inV.filter{ it.Key == 'romikoagency' 
 }.inE[[label:'USER_BELONGS_TO']].outV.filter{ it.Username == 
 'romiko.derbynew' 
 }.as('CreatedBy').outE[[label:'USER_LINKED_TO_PROGRAM']].inV.as('ReferralGroup').inE[[label:'HAS_SUGGESTED_PROGRAM']].outV.inE[[label:'REFERRAL_HAS_DECISIONS_SECTION']].outV.as('ReferralId').as('ReferralDate').table(new
  Table()){it.Username}{it.Name}{it.UniqueId}{it.DateInitiatedUtc}.cap
 }

 Notice: .as('ReferralId').as('ReferralDate') and then the columns 
 columns  ReferralDate, ReferralId ]

 Results
 [ [ {
 data : [ [ romiko.derbynew, Testa, 331, 
 /Date(1322007153048+1100)/ ]], columns : [ CreatedBy, 
 ReferralGroup, ReferralDate, ReferralId ] } ] ]


 ___
 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] Gremlin Query - Help

2011-11-30 Thread Romiko Derbynew
Hi,


Scenario 1:
I would like to get all Nodes that do not have a relationship to another node. 
What is the best way to do this Gremlin?

Root = NodeA = NodeB
Root = NodeC

Output should be NodeC

Scenario 2:
Root =  User - Centre

I would like to get all centres for userA, and then get all users who are also 
linked to the same centres of the userA


Scenario 3:
User = Centre
I would like to get all users that do not have a link to a Centre, and if this 
is the case, do a projection that returns a fake centre with property Unknown

Scenario 4:

REFERRAL = PERSON

I would like to combine a query that gets all
Referrals that are linked to a person and project a table result (contains 
referrals and person property values (this is easy to do)
However, I then want to do a SPLIT query, that gets referrals without the 
persons, and then MERGE both back into the table projection? So table projecton 
might look like this.
I guess this is done with .table().it{}cap, but what I am not sure, is how 
to do a split and merge in parallel and then get that merge projected into the 
same table.

ReferralId, Name
1, Bob
2, Jill
3, null
4, null

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


[Neo4j] New Bug Logged - Gremlin 114

2011-11-29 Thread Romiko Derbynew
Hi,

New bugged logged at: https://github.com/neo4j/community/issues/114

Details below for others to peruse.

Gremlin Table Projections - Column Order Incorrect when using chained 
.As('x').As('y')

EXPECTED Order: Createdy, ReferralGroup, ReferralId, ReferralData

When AS statements appear next to each other.
Consider A (WORKS - But not logical - have to reverse order when more than 1 AS 
statement is chained together right after each other for column array to match):
{script:g.v(0).outE[[label:'HOSTS']].inV.filter{ it.Key == 'romikoagency' 
}.inE[[label:'USER_BELONGS_TO']].outV.filter{ it.Username == 'romiko.derbynew' 
}.as('CreatedBy').outE[[label:'USER_LINKED_TO_PROGRAM']].inV.as('ReferralGroup').inE[[label:'HAS_SUGGESTED_PROGRAM']].outV.inE[[label:'REFERRAL_HAS_DECISIONS_SECTION']].outV.as('ReferralDate').as('ReferralId').table(new
 Table()){it.Username}{it.Name}{it.UniqueId}{it.DateInitiatedUtc}.cap
}

notice: as('ReferralDate').as('ReferralId') and then notice the column order 
below is opposite this: columns  ReferralId, ReferralDate ]

Results
[ [ {
data : [ [ romiko.derbynew, Testa, 331, /Date(1322007153048+1100)/ ], [ 
romiko.derbynew, Testa, 321, /Date(1322003375637+1100)/ ]], 
columns : [ CreatedBy, ReferralGroup, ReferralId, ReferralDate ]
} ] ]


Consider B (Does not work - this is more LOGICAL from gremlin perspective but 
is bugged, the Chained AS right after each other gets reversed in the column 
array.)
{script:g.v(0).outE[[label:'HOSTS']].inV.filter{ it.Key == 'romikoagency' 
}.inE[[label:'USER_BELONGS_TO']].outV.filter{ it.Username == 'romiko.derbynew' 
}.as('CreatedBy').outE[[label:'USER_LINKED_TO_PROGRAM']].inV.as('ReferralGroup').inE[[label:'HAS_SUGGESTED_PROGRAM']].outV.inE[[label:'REFERRAL_HAS_DECISIONS_SECTION']].outV.as('ReferralId').as('ReferralDate').table(new
 Table()){it.Username}{it.Name}{it.UniqueId}{it.DateInitiatedUtc}.cap
}

Notice: .as('ReferralId').as('ReferralDate') and then the columns columns 
 ReferralDate, ReferralId ]

Results
[ [ {
data : [ [ romiko.derbynew, Testa, 331, /Date(1322007153048+1100)/ ]],
columns : [ CreatedBy, ReferralGroup, ReferralDate, ReferralId ]
} ] ]


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


[Neo4j] Invalid JSON Issue

2011-11-27 Thread Romiko Derbynew
Hi,

Ticket opened

https://github.com/neo4j/community/issues/110

Details:

When I try run this query via rest.
{script:g.v(0).out('HOSTS').filter{ it.Key == 
'romikoagency'}.in('USER_BELONGS_TO').as('username').as('userGivenName').out('USER_LINKED_TO_PROGRAM').as('program').table(new
 Table()){it.Username}{it.GivenName}{it.Name}.cap
}

Notice the combination of table and cap. I get this result in the raw HTTP 
response.
[ [[userGivenName:romiko.derbynew, username:Romiko, program:Testa], 
[userGivenName:romiko.derbynew, username:Romiko, program:Zumba Lessons], 
[userGivenName:romiko.derbynew, username:Romiko, program:Counselling], 
[userGivenName:romiko.derbynew, username:Romiko, program:Counselling], 
[userGivenName:romiko.derbynew, username:Romiko, program:After Care]] ]

The above JSON result is invalid, should it be?:
[
{userGivenName:romiko.derbynew, username:Romiko, program:Testa},
{userGivenName:romiko.derbynew, username:Romiko, program:Zumba 
Lessons}, {userGivenName:romiko.derbynew, username:Romiko, 
program:Counselling},
{userGivenName:romiko.derbynew, username:Romiko, 
program:Counselling},
{userGivenName:romiko.derbynew, username:Romiko, program:After Care}
]

We have extended the Neo4jClient to now support table projections and cap 
combo, however, the JSON deserialization is broken due to the invalid json 
results.

Kind Regards
Romiko

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


Re: [Neo4j] Wrong Gremlin results through REST interface

2011-11-08 Thread Romiko Derbynew
Hi,

I am not sure of this, since the console version with .filter{ it works, 
and in rest it does not. I then ran a version in the console and via rest and 
they both the same version, am I doing something wrong?

Either way, I will update our rest client to use the explicit filter expression.

Console Version:
gremlin Gremlin.version()
== 1.2

REST Version
http://localhost:20001/db/data/ext/GremlinPlugin/graphdb/execute_script
User-Agent: Fiddler
Host: localhost:20001
Accept: application/json
Content-Type: application/x-www-form-urlencoded

Request Body: script=Gremlin.version()

Response: 1.2

Peter, is it possible to explain why the REST needs the explicit .filter and 
the console not? Just for future reference, since if the versions were 
different then it would make sense to me?

Thank You


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko Rodriguez
Sent: Wednesday, 9 November 2011 3:06 AM
To: Peter Neubauer
Cc: Neo4j user discussions; Michael Hunger
Subject: Re: [Neo4j] Wrong Gremlin results through REST interface

Hey,

To expand on Peter's point. I suspect people are mixing versions of Gremlin. 
Gremlin is generally (not usually) backwards compatible from version to 
version. If you are using Gremlin REPL, GremlinPlugin, and Gremlin from Neo4j 
WebAdmin, its good to make sure you have the same version of Gremlin in 
instances. Here is how you check:

GremlinTokens.VERSION 
(for old skool Gremlin)
Gremlin.version()   
(for new skool Gremlin)

If your versions are not consistent then this may be the reason why you're 
traversals in Gremlin REPL are working, but not in Gremlin Plugin (for example).

HTH,
Marko.

http://markorodriguez.com

On Nov 8, 2011, at 8:52 AM, Peter Neubauer wrote:

 Hi all (and Romiko),
 it might be that this issue, as Romikos, is confusion about the use of 
 the {}. In Gremlin 1.3, you have to explicitly use filter{} in order 
 to do this, see https://github.com/neo4j/gremlin-plugin/issues/3 for 
 an example.
 
 I have locally comitted a documentation example for this, but I am 
 waiting for the release to finish before pushing it. Could you try 
 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 Tue, Nov 8, 2011 at 11:43 AM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:
 Yup,
 I have at least Tathams issue to start with. Will report back and see 
 if it solves this one too. Feel free to add this example to the issue 
 on the Gremlin plugin.
 
 On Nov 8, 2011 12:32 PM, Michael Hunger 
 michael.hun...@neotechnology.com
 wrote:
 
 There are some weird things going on. Probably have to do with
 javax.script.ScriptEngine.eval()
 
 We should investigate this thoroughly.
 
 Perhaps Peter and Marko can spend some cycles on it.
 
 Michael
 
 1) behaviour native gremlin vs
 2) Neo4j web console vs.
 3) REST-calls
 
 Am 08.11.2011 um 12:02 schrieb Jeroen van Dijk:
 
 HI Michael,
 
 Thanks for this solution. The webconsole now gives me the right 
 results also for recommendation query. There is however still 
 something weird when I use this recommendation query in the gremlin 
 console:
 
 gremlin node = g.v(14260); m = [:].withDefault{0.0}; a_total =
 node.inE().count(); node.in().out('owns').sideEffect{union = 
 a_total +
 it.inE().count()}.groupCount(m) { it : it += (1.0/(union)) }  -1; 
 m.sort{a,b - b.value = a.value}[0..9] No signature of method:
 com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jVertex.plus() is 
 applicable for argument types: (java.math.BigDecimal) values: 
 [0.0303030303] Possible solutions: values(), keys(), 
 use([Ljava.lang.Object;), values(java.lang.Object), 
 is(java.lang.Object),
 split(groovy.lang.Closure)
 
 The weird thing is that exact same query does work in the webconsole..
 
 Consider my issue solved though. Thanks a lot.
 
 Jeroen
 
 On Mon, Nov 7, 2011 at 1:25 PM, Michael Hunger  
 michael.hun...@neotechnology.com wrote:
 
 Jeroen,
 
 could you try to use the alternative syntax:
 
 ... groupCount(m) { it : it += 0.1 } ...
 
 It seems to be a problem with evaluation of the string in the 
 javax.ScriptEngine for Groovy
 
 Here is the output from my web-console:
   . gremlin m = [:];g.v(33).bothE().label.groupCount(m) { it 
 }{ it
 += 0.1 }  -1;m
   . == follows=11
   . == owns=48
   . gremlin m = [:];g.v(33).bothE().label.groupCount(m) { it 
 : it
 +=
 0.1 }  -1;m
   . == follows=1.1
   . == owns=4.8
 
 Michael
 
 Am 07.11.2011 um 12:55 schrieb Jeroen van Dijk:
 
 Ok i think I found an example that is independent of my data 
 (adapted
 from
 

Re: [Neo4j] Gremlig Plugin - Paramerterised Queries + Enumeration - Neo4j 1.5M02

2011-11-07 Thread Romiko Derbynew
Hi Guys,

I can confirm that the gremlin query works in the Console but not in the REST 
API.
Console Working:
gremlin g.v(0).outE[[label:'HOSTS']].inV{ it['UniqueId'] == 11761 
}.drop(0).take(100)._()
== v[756]

I will log a bug issue on this: https://github.com/neo4j/gremlin-plugin/issues/3

Thank you


From: mystory-develop...@barnardos.org.au 
[mailto:mystory-develop...@barnardos.org.au] On Behalf Of Romiko Derbynew
Sent: Monday, 7 November 2011 10:48 AM
To: Neo4j user discussions
Cc: Tatham Oddie; mystory-develop...@barnardos.org.au
Subject: [mystory-developers] Gremlig Plugin - Paramerterised Queries + 
Enumeration - Neo4j 1.5M02

Hi Guys,

I have found a new bug in the Neo4j 1.5M02 release, or perhaps a different way 
of querying needs to be done. 
If I do a HTTP POST with this
127.255.0.0:20001/db/data/ext/GremlinPlugin/graphdb/execute_script

HTTP POST
Content[1] = {Accept=application/xml, text/json, text/x-json, text/javascript, 
text/xml, application/json}
Content [2] = 
{
  script: g.v(p0).outE[[label:p1]].inV{ it[p2] == null 
}.drop(p3).take(p4)._(),
  params: {
    p0: 0,
    p1: HOSTS,
    p2: UniqueId,
    p3: 0,
    p4: 100
  }
}


The Response from the above HTTP POST is this:
javax.script.ScriptException: groovy.lang.MissingMethodException: No signature 
of method: com.tinkerpop.pipes.util.FluentPipeline.inV() is applicable for 
argument types: (Script10$_run_closure1) values: 
[Script10$_run_closure1@303a6f8]\nPossible solutions: inV(), 
in([Ljava.lang.String;), inE([Ljava.lang.String;), V(), id(), find()

This used to work with Neo4j 1.5M01 release. Has the code changed between the 
releases on how parameterized queries are now constructed in Gremlin?

Romiko Derbynew
Readify | Senior Consultant
Suite 408 Life.Lab Building | 198 Harbour Esplanade | Docklands | VIC 3008 | 
Australia 
M: +61 400 090 251 | E: romiko.derby...@readify.net | W: www.readify.net | 
Blog: romikoderbynew.com

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


Re: [Neo4j] 1.5.M02 - JVM BootStrapper Issues

2011-11-05 Thread Romiko Derbynew
Indeed, they all JVM switches.

Sent from my iPhone

On 05/11/2011, at 5:34 PM, Peter Neubauer peter.neuba...@neotechnology.com 
wrote:

 Romiko,
 this is probably linked to the same issue,
 https://github.com/neo4j/packaging/issues/2
 
 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 4:07 PM, Romiko Derbynew
 romiko.derby...@readify.net wrote:
 Hi Guys,
 
 I have downloaded the latest Community edition and notice these three custom 
 lines of code causing the Neo4J server not to start up:
 
 wrapper.java.additional.1=-d64
 wrapper.java.additional.1=-server
 wrapper.java.additional.1=-Xss2048k
 
 With the previous version, they worked fine. They live at the bottom of the 
 neo4j-wrapper.conf
 
 Error I get is.
 java.lang.IllegalArgumentException
at java.lang.ProcessImpl.init(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at 
 org.neo4j.wrapper.ServerProcessConsole.doStart(ServerProcessConsole.j
 ava:39)
at org.neo4j.wrapper.ServerProcess.init(ServerProcess.java:116)
at 
 org.neo4j.wrapper.ServerProcessConsole.init(ServerProcessConsole.ja
 va:29)
at 
 org.neo4j.wrapper.NeoServiceWrapper.launchAsConsoleApp(NeoServiceWrap
 per.java:48)
at org.neo4j.wrapper.NeoServiceWrapper.main(NeoServiceWrapper.java:35)
 
 Is this expected, since I am sure the JVM should support adding these 
 additional parameters?
 
 I want these in here, so I can always ensure it is 64bit, server mode with a 
 stack size of 2048k
 
 
 ___
 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] java.lang.IllegalArgumentException launching 1.5M02

2011-11-04 Thread Romiko Derbynew
Any custom JVM switches do not work.

Sent from my iPhone

On 03/11/2011, at 8:56 AM, Tatham Oddie tat...@oddie.com.au wrote:

 Any tips on where to start?
 
 I'm going to go looking for ServerProcessConsole.java but any other pointers 
 are welcome. :)
 
 
 C:\AzureTemp\Resources\2e546563-a35c-42f6-b903-03317cfdf847\directory\Neo4jInst\neo4j-community-1.5.M02\binNeo4j.bat
 java.lang.IllegalArgumentException
at java.lang.ProcessImpl.init(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at 
 org.neo4j.wrapper.ServerProcessConsole.doStart(ServerProcessConsole.java:39)
at org.neo4j.wrapper.ServerProcess.init(ServerProcess.java:116)
at 
 org.neo4j.wrapper.ServerProcessConsole.init(ServerProcessConsole.java:29)
at 
 org.neo4j.wrapper.NeoServiceWrapper.launchAsConsoleApp(NeoServiceWrapper.java:48)
at org.neo4j.wrapper.NeoServiceWrapper.main(NeoServiceWrapper.java:35)
 
 C:\AzureTemp\Resources\2e546563-a35c-42f6-b903-03317cfdf847\directory\Neo4jInst\neo4j-community-1.5.M02\bin
 
 --
 Tatham Oddie
 au mob: +61 414 275 989, us cell: +1 415 598 8201, skype: tathamoddie
 If you're printing this email, you're doing it wrong. This is a computer, not 
 a typewriter.
 
 ___
 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] 1.5.M02 - JVM BootStrapper Issues

2011-11-04 Thread Romiko Derbynew
Windows

Sent from my iPhone

On 04/11/2011, at 11:40 AM, Peter Neubauer peter.neuba...@neotechnology.com 
wrote:

 Romiko,
 is this on Windows or Linux?
 
 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 5:22 PM, Romiko Derbynew
 romiko.derby...@readify.net wrote:
 Hi Peter,
 
 I tried that as well, but to no avail, here is how to reproduce it.
 
 #
 # JVM Parameters
 #
 
 wrapper.java.additional.1=-Dorg.neo4j.server.properties=conf/neo4j-server.properties
 wrapper.java.additional.2=-Djava.util.logging.config.file=conf/logging.properties
 
 # Uncomment the following line to enable garbage collection logging
 #wrapper.java.additional.3=-Xloggc:data/log/neo4j-gc.log
 
 #These three lines are behaving badly.
 wrapper.java.additional.4=-d64
 wrapper.java.additional.5=-server
 wrapper.java.additional.6=-Xss2048k
 
 
 # Initial Java Heap Size (in MB)
 wrapper.java.initmemory=512
 
 # Maximum Java Heap Size (in MB)
 wrapper.java.maxmemory=1024
 
 #
 # Wrapper settings
 #
 
 
 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
 Behalf Of Peter Neubauer
 Sent: Friday, 4 November 2011 10:48 AM
 To: Neo4j user discussions
 Cc: Tatham Oddie
 Subject: Re: [Neo4j] 1.5.M02 - JVM BootStrapper Issues
 
 Romiko,
 could you give the parameters different numbers, like in
 https://github.com/neo4j/packaging/blob/master/standalone/src/main/distribution/text/community/conf/neo4j-wrapper.conf#L5
 and try again?
 
 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 4:07 PM, Romiko Derbynew 
 romiko.derby...@readify.net wrote:
 Hi Guys,
 
 I have downloaded the latest Community edition and notice these three 
 custom lines of code causing the Neo4J server not to start up:
 
 wrapper.java.additional.1=-d64
 wrapper.java.additional.1=-server
 wrapper.java.additional.1=-Xss2048k
 
 With the previous version, they worked fine. They live at the bottom
 of the neo4j-wrapper.conf
 
 Error I get is.
 java.lang.IllegalArgumentException
at java.lang.ProcessImpl.init(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at
 org.neo4j.wrapper.ServerProcessConsole.doStart(ServerProcessConsole.j
 ava:39)
at
 org.neo4j.wrapper.ServerProcess.init(ServerProcess.java:116)
at
 org.neo4j.wrapper.ServerProcessConsole.init(ServerProcessConsole.ja
 va:29)
at
 org.neo4j.wrapper.NeoServiceWrapper.launchAsConsoleApp(NeoServiceWrap
 per.java:48)
at
 org.neo4j.wrapper.NeoServiceWrapper.main(NeoServiceWrapper.java:35)
 
 Is this expected, since I am sure the JVM should support adding these 
 additional parameters?
 
 I want these in here, so I can always ensure it is 64bit, server mode
 with a stack size of 2048k
 
 
 ___
 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] 1.5.M02 - JVM BootStrapper Issues

2011-11-03 Thread Romiko Derbynew
Hi Guys,

I have downloaded the latest Community edition and notice these three custom 
lines of code causing the Neo4J server not to start up:

wrapper.java.additional.1=-d64
wrapper.java.additional.1=-server
wrapper.java.additional.1=-Xss2048k

With the previous version, they worked fine. They live at the bottom of the 
neo4j-wrapper.conf

Error I get is.
java.lang.IllegalArgumentException
at java.lang.ProcessImpl.init(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at org.neo4j.wrapper.ServerProcessConsole.doStart(ServerProcessConsole.j
ava:39)
at org.neo4j.wrapper.ServerProcess.init(ServerProcess.java:116)
at org.neo4j.wrapper.ServerProcessConsole.init(ServerProcessConsole.ja
va:29)
at org.neo4j.wrapper.NeoServiceWrapper.launchAsConsoleApp(NeoServiceWrap
per.java:48)
at org.neo4j.wrapper.NeoServiceWrapper.main(NeoServiceWrapper.java:35)

Is this expected, since I am sure the JVM should support adding these 
additional parameters? 

I want these in here, so I can always ensure it is 64bit, server mode with a 
stack size of 2048k


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


Re: [Neo4j] Exception when converting older graph

2011-11-03 Thread Romiko Derbynew
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 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 

Re: [Neo4j] 1.5.M02 - JVM BootStrapper Issues

2011-11-03 Thread Romiko Derbynew
Hi Peter,

I tried that as well, but to no avail, here is how to reproduce it.

#
# JVM Parameters
#
 
wrapper.java.additional.1=-Dorg.neo4j.server.properties=conf/neo4j-server.properties
wrapper.java.additional.2=-Djava.util.logging.config.file=conf/logging.properties

# Uncomment the following line to enable garbage collection logging
#wrapper.java.additional.3=-Xloggc:data/log/neo4j-gc.log

#These three lines are behaving badly.
wrapper.java.additional.4=-d64
wrapper.java.additional.5=-server
wrapper.java.additional.6=-Xss2048k


# Initial Java Heap Size (in MB)
wrapper.java.initmemory=512

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024

#
# Wrapper settings
#


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Friday, 4 November 2011 10:48 AM
To: Neo4j user discussions
Cc: Tatham Oddie
Subject: Re: [Neo4j] 1.5.M02 - JVM BootStrapper Issues

Romiko,
could you give the parameters different numbers, like in
https://github.com/neo4j/packaging/blob/master/standalone/src/main/distribution/text/community/conf/neo4j-wrapper.conf#L5
and try again?

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 4:07 PM, Romiko Derbynew romiko.derby...@readify.net 
wrote:
 Hi Guys,

 I have downloaded the latest Community edition and notice these three custom 
 lines of code causing the Neo4J server not to start up:

 wrapper.java.additional.1=-d64
 wrapper.java.additional.1=-server
 wrapper.java.additional.1=-Xss2048k

 With the previous version, they worked fine. They live at the bottom 
 of the neo4j-wrapper.conf

 Error I get is.
 java.lang.IllegalArgumentException
        at java.lang.ProcessImpl.init(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        at java.lang.ProcessBuilder.start(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at 
 org.neo4j.wrapper.ServerProcessConsole.doStart(ServerProcessConsole.j
 ava:39)
        at 
 org.neo4j.wrapper.ServerProcess.init(ServerProcess.java:116)
        at 
 org.neo4j.wrapper.ServerProcessConsole.init(ServerProcessConsole.ja
 va:29)
        at 
 org.neo4j.wrapper.NeoServiceWrapper.launchAsConsoleApp(NeoServiceWrap
 per.java:48)
        at 
 org.neo4j.wrapper.NeoServiceWrapper.main(NeoServiceWrapper.java:35)

 Is this expected, since I am sure the JVM should support adding these 
 additional parameters?

 I want these in here, so I can always ensure it is 64bit, server mode 
 with a stack size of 2048k


 ___
 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] .Net Data Provider for Neo4j

2011-10-20 Thread Romiko Derbynew
http://hg.readify.net/neo4jclient


Sent from my iPhone

On 20/10/2011, at 6:11 AM, Christian Straight 
protosap...@mightyelephant.com wrote:

 Anybody working on a neo4j .Net Data Provider?
 
 regards,
 Christian Straight
 
 
 .:. Typed with thumbs and sent from my HTC Evo
 
 ___
 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] Standalone neo4j server log question

2011-10-16 Thread Romiko Derbynew
It uses same settings as JVM, try FINEST, this will do everything including all 
rest calls.

Sent from my iPhone

On 17/10/2011, at 6:47 AM, Nuo Yan yan@gmail.com wrote:

 I use neo4j as a standalone server with REST. I currently set the log level
 to be INFO in conf/logging.properties:
 
 org.neo4j.server.level=INFO
 java.util.logging.ConsoleHandler.level=INFO
 java.util.logging.ConsoleHandler.formatter=org.neo4j.server.logging.SimpleConsoleFormatter
 java.util.logging.ConsoleHandler.filter=org.neo4j.server.logging.NeoLogFilter
 
 
 However, I don't see any log showing up on the per request basis. I want to
 be able to see when requests coming in (no matter succeeded or not). Is
 there anywhere I'm missing configuration? How can I enable log corresponding
 to every request coming in?
 
 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] Neo4JClient - .Net - Wiki Documentation updated

2011-10-13 Thread Romiko Derbynew
Hi,

The Neo4j documentation has been updated at:
http://hg.readify.net/neo4jclient/wiki/Home

HTH

-Original Message-
From: Romiko Derbynew 
Sent: Monday, 10 October 2011 10:22 AM
To: 'Bill Baker'
Cc: Tatham Oddie; 'user@lists.neo4j.org'
Subject: RE: [Neo4j] C# REST binding / wrapper

Bill,

Here is an example to create a node without any relationships.

graphClient.Create(new WebSite { Name = acme });

Of course, a better example would be if you had multiple root nodes, perhaps 
different hosting sites if it was a multi-tenant portal db.

Cheers

-Original Message-
From: Romiko Derbynew
Sent: Monday, 10 October 2011 10:14 AM
To: 'Bill Baker'
Cc: Tatham Oddie; user@lists.neo4j.org
Subject: RE: [Neo4j] C# REST binding / wrapper

Hi Bill,


Indeed, it makes sense to have the relationships stemming from the root node.

There is a nice tool you can use to start modelling your graph, it is called 
GVEdit. You can download it from here:
http://www.graphviz.org/

What we do, is before developing, we first add the poco's to GVEdit, and this 
gives us a good idea of how we want to model the database. We always try to 
ensure that everything in the DB grows in proportion. So for example, if we add 
new nodes, there will be new relationships etc.

For reference data (Perhaps a country names etc) we just have a Countries 
Category and then off that each individual country. You can then have a drop 
down list in the UI that gets all country nodes from Countries (Grouping Node).

Here is an example of retrieving a list of countries. Each Country is a node 
and is Grouped in a Countries Node.

public IEnumerableNodeCountry GetCountries()
{
if (countries != null) return countries;

lock (countriesLock)
{
if (countries != null) return countries;
countries = graphClient
.RootNode
.OutReferenceDataCategory(HasReferenceData.TypeKey)
.OutCountriesCategory(HasCountries.TypeKey)
.OutCountry(HasCountry.TypeKey)
.OrderBy(l = l.Data.Name)
.ToArray();
}

return countries;
}


Notice:
Root Node (g.v(0)) is built into the graphclient, so you automatically have a 
reference to g.v.(0)
RootNode-ReferenceDataCategory - CountriesCategory -Country

You can name your relationships any way you like, it is always nice if they are 
descriptive enough to give you an idea what direction it would be.
e.g. 
HAS_PERMISSION (Implies from User to a Permission node)

Also, you have store payload information on relationships as well, which can be 
useful in some scenarios.

I recall, mentioning a way to populate this reference data e.g. a Resource file 
with list of countries, so perhaps the first time the db starts up, you can run 
a sort of schema check.

See this link below for examples of gvedit and code using the graph client to 
create lookup data in the DB:

http://hg.readify.net/neo4jclient/wiki/samples


Cheers

-Original Message-
From: Bill Baker [mailto:bill...@billbak.com]
Sent: Monday, 10 October 2011 4:33 AM
To: Romiko Derbynew
Subject: RE: [Neo4j] C# REST binding / wrapper

That makes a lot of sense.  I guess my follow up question is a more generic 
Neo4j/graph question;  in your schema below, would you have N links from the 
root to N CompanyNodes or one line to a 'Companies' node and N links from there 
to the N companies?  And in either case, does it matter much what we call the 
links from the root to the companies (or groups, or people...)?  Seems like 
that relationship is either an IsA_ link from the root or a BelongsTo 
from the node.

Thanks!

BTW, any sample code helps!  Thanks.

-Original Message-
From: Romiko Derbynew [mailto:romiko.derby...@readify.net]
Sent: Saturday, October 08, 2011 8:03 PM
To: Bill Baker
Subject: Re: [Neo4j] C# REST binding / wrapper

Hi Bill,

Indeed you will also need to define a relationship with the participating node. 
So for example you might have node called Groups which a person belongs to.

Then you might ask but what is Groups related to, well at some point it will be 
off the ROOT node.

E.g
RootNode-CompanyNode-Groups-person

So as you see your very first node will be off Root and away you go, the 
graphclient always holds a reference to the root node. 

So, when making a node, always have the relationship and participating node.

What we have in our system is a schema manager that always checks the DB for 
the core nodes e.g Company off root Users off Company Customers off Company 

And so on.

Let me know how you go, else I can send you sample code to (initialize) your db 
schema. 

Cc me at romiko.derby...@readify.net

Sent from my iPhone

On 09/10/2011, at 6:45 AM, Bill Baker bill...@billbak.com wrote:

 Romiko,
 
 I'm back to trying Neo4jClient and honestly,  am missing something critical I 
 think.  I read

Re: [Neo4j] C# REST binding / wrapper

2011-10-09 Thread Romiko Derbynew
Hi Bill,


Indeed, it makes sense to have the relationships stemming from the root node.

There is a nice tool you can use to start modelling your graph, it is called 
GVEdit. You can download it from here:
http://www.graphviz.org/

What we do, is before developing, we first add the poco's to GVEdit, and this 
gives us a good idea of how we want to model the database. We always try to 
ensure that everything in the DB grows in proportion. So for example, if we add 
new nodes, there will be new relationships etc.

For reference data (Perhaps a country names etc) we just have a Countries 
Category and then off that each individual country. You can then have a drop 
down list in the UI that gets all country nodes from Countries (Grouping Node).

Here is an example of retrieving a list of countries. Each Country is a node 
and is Grouped in a Countries Node.

public IEnumerableNodeCountry GetCountries()
{
if (countries != null) return countries;

lock (countriesLock)
{
if (countries != null) return countries;
countries = graphClient
.RootNode
.OutReferenceDataCategory(HasReferenceData.TypeKey)
.OutCountriesCategory(HasCountries.TypeKey)
.OutCountry(HasCountry.TypeKey)
.OrderBy(l = l.Data.Name)
.ToArray();
}

return countries;
}


Notice:
Root Node (g.v(0)) is built into the graphclient, so you automatically have a 
reference to g.v.(0)
RootNode-ReferenceDataCategory - CountriesCategory -Country

You can name your relationships any way you like, it is always nice if they are 
descriptive enough to give you an idea what direction it would be.
e.g. 
HAS_PERMISSION (Implies from User to a Permission node)

Also, you have store payload information on relationships as well, which can be 
useful in some scenarios.

I recall, mentioning a way to populate this reference data e.g. a Resource file 
with list of countries, so perhaps the first time the db starts up, you can run 
a sort of schema check.

See this link below for examples of gvedit and code using the graph client to 
create lookup data in the DB:

http://hg.readify.net/neo4jclient/wiki/samples


Cheers

-Original Message-
From: Bill Baker [mailto:bill...@billbak.com] 
Sent: Monday, 10 October 2011 4:33 AM
To: Romiko Derbynew
Subject: RE: [Neo4j] C# REST binding / wrapper

That makes a lot of sense.  I guess my follow up question is a more generic 
Neo4j/graph question;  in your schema below, would you have N links from the 
root to N CompanyNodes or one line to a 'Companies' node and N links from there 
to the N companies?  And in either case, does it matter much what we call the 
links from the root to the companies (or groups, or people...)?  Seems like 
that relationship is either an IsA_ link from the root or a BelongsTo 
from the node.

Thanks!

BTW, any sample code helps!  Thanks.

-Original Message-
From: Romiko Derbynew [mailto:romiko.derby...@readify.net]
Sent: Saturday, October 08, 2011 8:03 PM
To: Bill Baker
Subject: Re: [Neo4j] C# REST binding / wrapper

Hi Bill,

Indeed you will also need to define a relationship with the participating node. 
So for example you might have node called Groups which a person belongs to.

Then you might ask but what is Groups related to, well at some point it will be 
off the ROOT node.

E.g
RootNode-CompanyNode-Groups-person

So as you see your very first node will be off Root and away you go, the 
graphclient always holds a reference to the root node. 

So, when making a node, always have the relationship and participating node.

What we have in our system is a schema manager that always checks the DB for 
the core nodes e.g Company off root Users off Company Customers off Company 

And so on.

Let me know how you go, else I can send you sample code to (initialize) your db 
schema. 

Cc me at romiko.derby...@readify.net

Sent from my iPhone

On 09/10/2011, at 6:45 AM, Bill Baker bill...@billbak.com wrote:

 Romiko,
 
 I'm back to trying Neo4jClient and honestly,  am missing something critical I 
 think.  I read the post below, and I appreciate the type safety built into 
 the mechanism.  But in my over-tired state, I'm seeing that I can only create 
 a node if I create a relationship at the same time.  I'm missing something...
 
 What is the simple way to create a node of type Person (where Person is 
 defined by a class in my code)?
 
 
 I modeled the PersonBelongsTo on the UserBelongsTo class from the blog post.  
 But my reading suggests I need an already created (Club) node in order to 
 initialize the PersonBelongsTo class.  
 
 Then I can do NodeReference node = client.CreatePerson(bob, new 
 PersonBelongsTo ());  [Where bob is an instance of  a Person
 class.)
 
 Thanks!!
 
 Bill
 
 
public class PersonBelongsTo :
Relationship

Re: [Neo4j] C# REST binding / wrapper

2011-10-09 Thread Romiko Derbynew
Bill,

Here is an example to create a node without any relationships.

graphClient.Create(new WebSite { Name = acme });

Of course, a better example would be if you had multiple root nodes, perhaps 
different hosting sites if it was a multi-tenant portal db.

Cheers

-Original Message-
From: Romiko Derbynew 
Sent: Monday, 10 October 2011 10:14 AM
To: 'Bill Baker'
Cc: Tatham Oddie; user@lists.neo4j.org
Subject: RE: [Neo4j] C# REST binding / wrapper

Hi Bill,


Indeed, it makes sense to have the relationships stemming from the root node.

There is a nice tool you can use to start modelling your graph, it is called 
GVEdit. You can download it from here:
http://www.graphviz.org/

What we do, is before developing, we first add the poco's to GVEdit, and this 
gives us a good idea of how we want to model the database. We always try to 
ensure that everything in the DB grows in proportion. So for example, if we add 
new nodes, there will be new relationships etc.

For reference data (Perhaps a country names etc) we just have a Countries 
Category and then off that each individual country. You can then have a drop 
down list in the UI that gets all country nodes from Countries (Grouping Node).

Here is an example of retrieving a list of countries. Each Country is a node 
and is Grouped in a Countries Node.

public IEnumerableNodeCountry GetCountries()
{
if (countries != null) return countries;

lock (countriesLock)
{
if (countries != null) return countries;
countries = graphClient
.RootNode
.OutReferenceDataCategory(HasReferenceData.TypeKey)
.OutCountriesCategory(HasCountries.TypeKey)
.OutCountry(HasCountry.TypeKey)
.OrderBy(l = l.Data.Name)
.ToArray();
}

return countries;
}


Notice:
Root Node (g.v(0)) is built into the graphclient, so you automatically have a 
reference to g.v.(0)
RootNode-ReferenceDataCategory - CountriesCategory -Country

You can name your relationships any way you like, it is always nice if they are 
descriptive enough to give you an idea what direction it would be.
e.g. 
HAS_PERMISSION (Implies from User to a Permission node)

Also, you have store payload information on relationships as well, which can be 
useful in some scenarios.

I recall, mentioning a way to populate this reference data e.g. a Resource file 
with list of countries, so perhaps the first time the db starts up, you can run 
a sort of schema check.

See this link below for examples of gvedit and code using the graph client to 
create lookup data in the DB:

http://hg.readify.net/neo4jclient/wiki/samples


Cheers

-Original Message-
From: Bill Baker [mailto:bill...@billbak.com]
Sent: Monday, 10 October 2011 4:33 AM
To: Romiko Derbynew
Subject: RE: [Neo4j] C# REST binding / wrapper

That makes a lot of sense.  I guess my follow up question is a more generic 
Neo4j/graph question;  in your schema below, would you have N links from the 
root to N CompanyNodes or one line to a 'Companies' node and N links from there 
to the N companies?  And in either case, does it matter much what we call the 
links from the root to the companies (or groups, or people...)?  Seems like 
that relationship is either an IsA_ link from the root or a BelongsTo 
from the node.

Thanks!

BTW, any sample code helps!  Thanks.

-Original Message-
From: Romiko Derbynew [mailto:romiko.derby...@readify.net]
Sent: Saturday, October 08, 2011 8:03 PM
To: Bill Baker
Subject: Re: [Neo4j] C# REST binding / wrapper

Hi Bill,

Indeed you will also need to define a relationship with the participating node. 
So for example you might have node called Groups which a person belongs to.

Then you might ask but what is Groups related to, well at some point it will be 
off the ROOT node.

E.g
RootNode-CompanyNode-Groups-person

So as you see your very first node will be off Root and away you go, the 
graphclient always holds a reference to the root node. 

So, when making a node, always have the relationship and participating node.

What we have in our system is a schema manager that always checks the DB for 
the core nodes e.g Company off root Users off Company Customers off Company 

And so on.

Let me know how you go, else I can send you sample code to (initialize) your db 
schema. 

Cc me at romiko.derby...@readify.net

Sent from my iPhone

On 09/10/2011, at 6:45 AM, Bill Baker bill...@billbak.com wrote:

 Romiko,
 
 I'm back to trying Neo4jClient and honestly,  am missing something critical I 
 think.  I read the post below, and I appreciate the type safety built into 
 the mechanism.  But in my over-tired state, I'm seeing that I can only create 
 a node if I create a relationship at the same time.  I'm missing something...
 
 What is the simple way to create a node of type Person (where Person

Re: [Neo4j] C# REST binding / wrapper

2011-10-03 Thread Romiko Derbynew
There is some examples at http://romikoderbynew.com

Cheers

Sent from my iPhone

On 03/10/2011, at 6:36 PM, Bill Baker bill...@billbak.com wrote:

 Thank you.  I have started using it.  I have to take a week off the project 
 for other things going on, but will pick it up again soon.  If anyone knows 
 of any examples of using it, that would be cool too.
 
 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
 Behalf Of Tatham Oddie
 Sent: Sunday, October 02, 2011 4:49 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] C# REST binding / wrapper
 
 Thanks for the mention Peter.
 
 Bill - we're currently building a mission critical system using ASP.NET MVC + 
 Neo4j. We are developing the Neo4jClient as we go, adding features as we need 
 them.
 
 So far this covers:
 
 * all the CRUD operations
 * most of the Gremlin operations via a nice fluent interface
 * all of the Gremlin operations if you want to pass in Gremlin script directly
 * index creation, management and querying
 * shutting down the neo4j server cleanly (send a shutdown command via REST 
 before tearing the process down)
 
 You'll notice on our NuGet page that new builds are getting published almost 
 daily.
 
 
 -- Tatham
 
 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
 Behalf Of Peter Neubauer
 Sent: Friday, 30 September 2011 2:13 AM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] C# REST binding / wrapper
 
 Bill,
 I think the most active C# REST client is 
 http://nuget.org/List/Packages/Neo4jClient by Romiko and Tatham. It seems 
 very complete - we are in the process of updating the wiki and pulling it 
 into docs.neo4j org so it doesn't get outdated ...
 
 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 29, 2011 at 6:07 PM, Bill Baker bill...@billbak.com wrote:
 I checked the FAQ but didn't see this item.
 (http://wiki.neo4j.org/content/FAQ)
 
 I've downloaded and used two of the wrappers out there, Neo4RestNet and 
 Neo4jRestSharp.  I haven't been able to convince myself they are complete; 
 but I'm still very new at Neo4j so my issues may be more my inexperience 
 than incompleteness of either of these.
 
 So some quick questions:
 
 Can I do everything using REST that I can using the Java API?
 Do either or both of these wrap every REST request?  (I haven't yet 
 doped out how to do indexing in RestNet, but am still trying.) What 
 else is there for us .Net types?  (I know, I know, it's Neo-for-JAY!)
 
 Thanks!
 
 --
 Bill Baker, Investor, Advisor, Board Member My other house is a data 
 warehouse
 
 ___
 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


Re: [Neo4j] C# REST binding / wrapper

2011-09-29 Thread Romiko Derbynew
Here is something to help you get started

http://romikoderbynew.com/2011/07/30/neo4jclient-primer/

http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-neo4j/

Cheers

Sent from my iPhone

On 30/09/2011, at 3:03 AM, Bill Baker bill...@billbak.com wrote:

 Thanks!  I will check it out.
 
 Connected by DROID on Verizon Wireless
 
 
 -Original message-
 From: Peter Neubauer peter.neuba...@neotechnology.com
 To: Neo4j user discussions user@lists.neo4j.org
 Sent: Thu, Sep 29, 2011 16:13:18 GMT+00:00
 Subject: Re: [Neo4j] C# REST binding / wrapper
 
 Bill,
 I think the most active C# REST client is
 http://nuget.org/List/Packages/Neo4jClient by Romiko and Tatham. It
 seems very complete - we are in the process of updating the wiki and
 pulling it into docs.neo4j org so it doesn't get outdated ...
 
 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 29, 2011 at 6:07 PM, Bill Baker bill...@billbak.com wrote:
 I checked the FAQ but didn't see this item.  
 (http://wiki.neo4j.org/content/FAQ)
 
 I've downloaded and used two of the wrappers out there, Neo4RestNet and 
 Neo4jRestSharp.  I haven't been able to convince myself they are complete; 
 but I'm still very new at Neo4j so my issues may be more my inexperience 
 than incompleteness of either of these.
 
 So some quick questions:
 
 Can I do everything using REST that I can using the Java API?
 Do either or both of these wrap every REST request?  (I haven't yet doped 
 out how to do indexing in RestNet, but am still trying.)
 What else is there for us .Net types?  (I know, I know, it's Neo-for-JAY!)
 
 Thanks!
 
 --
 Bill Baker, Investor, Advisor, Board Member
 My other house is a data warehouse
 
 ___
 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


Re: [Neo4j] Turning Off or Configuring log rotation

2011-09-26 Thread Romiko Derbynew
Hi Peter,

Indeed our desired result is now achieved. Tatham added batching to our .net 
client as well. We are more than happy to assist with HA as this is one of the 
last hurdles we need to overcome. If you can let us know in advance when the 
release is scheduled then we will incorporate it into our sprint for HA 
featuring.

Much appreciated and thx for 1.5 release, could not have timed it better.

Sent from my iPhone

On 26/09/2011, at 5:33 PM, Peter Neubauer peter.neuba...@neotechnology.com 
wrote:

 Romiko,
 soudns good. Is this solving your current problems or is there stuff
 left to take care of for the moment? Also, there will be some code
 coming out on deploying Neo4j HA on Azure. Would you be interested in
 trying that out and maybe take it a bit further?

 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 Mon, Sep 26, 2011 at 4:16 AM, Romiko Derbynew
 romiko.derby...@readify.net wrote:
 Hi Guys,

 We managed to fix the performance issue.

 * Used Paramterised Queries - increased performance by 1 extra node per 
 second, reduced frequency usage of heap thus no jvm memory errors
 * Configured our .Net client to use 70 threads for rest calls (I chose this 
 number as Neo4j reserves 80, so I decided 70) 5 TIMES INCREASE IN 
 PERFORMANCE


 We are now going to implement the batching to improve performance even more 
 :)

 I have updated the blog post with these findings.
 http://romikoderbynew.com/2011/09/23/neo4j-java-jvm-garbage-collection-profilingheap-sizelog-rotationlucene-rest-api-performance-analysis/


 I will write a separate post on the improvements from the batching.

 MyStory Welcome, Temporary from MyStory Administration. Logout?
 Agency Import Job 301

 Log output:

 [01:44:58] [Thread   10] Migration message received at: 26/09/2011 1:44:58 
 AM +00:00

 [01:44:59] [Thread   10] Migration message payload: JobUniqueId: 301, 
 AgencyUniqueId: 201

 [01:44:59] [Thread   10] Executing sql script: 
 e:\AzureTemp\Resources\4bb24cfd-0b35-4c91-83de-97f335159a49\temp\temp\RoleTemp\634526342992784034\output.sql

 [01:45:01] [Thread   10] Processing script command line 1/37620

 [01:45:03] [Thread   10] Processing script command line 2/37620

 [01:45:05] [Thread   10] Processing script command line 3/37620

 [01:45:06] [Thread   10] All sql script commands executed 37620/37620

 [01:45:13] [Thread   10] Importing 37619 clients into the database

 [01:45:44] [Thread   12] Processed 169/37619 clients, 5.62 clients per 
 second, 01:51:06 remaining

 [01:46:16] [Thread   29] Processed 360/37619 clients, 5.80 clients per 
 second, 01:47:02 remaining

 [01:46:29] [Thread   69] Processed 1000/37619 clients, 13.30 clients per 
 second, 00:45:52 remaining

 [01:46:50] [Thread   28] Processed 2000/37619 clients, 20.78 clients per 
 second, 00:28:34 remaining

 [01:47:11] [Thread   30] Processed 3000/37619 clients, 25.47 clients per 
 second, 00:22:39 remaining

 [01:47:33] [Thread   32] Processed 4000/37619 clients, 28.71 clients per 
 second, 00:19:31 remaining

 [01:47:55] [Thread   76] Processed 5000/37619 clients, 30.95 clients per 
 second, 00:17:33 remaining

 [01:48:18] [Thread   87] Processed 6000/37619 clients, 32.52 clients per 
 second, 00:16:12 remaining

 [01:48:46] [Thread   13] Processed 7000/37619 clients, 32.95 clients per 
 second, 00:15:29 remaining

 [01:49:10] [Thread   70] Processed 8000/37619 clients, 33.84 clients per 
 second, 00:14:35 remaining

 [01:49:36] [Thread   54] Processed 9000/37619 clients, 34.25 clients per 
 second, 00:13:55 remaining

 [01:50:02] [Thread   64] Processed 1/37619 clients, 34.69 clients per 
 second, 00:13:16 remaining

 [01:50:29] [Thread   50] Processed 11000/37619 clients, 34.85 clients per 
 second, 00:12:43 remaining

 [01:50:57] [Thread   82] Processed 12000/37619 clients, 34.97 clients per 
 second, 00:12:12 remaining

 [01:51:25] [Thread   27] Processed 13000/37619 clients, 35.02 clients per 
 second, 00:11:42 remaining

 [01:51:54] [Thread   10] Processed 14000/37619 clients, 34.99 clients per 
 second, 00:11:15 remaining

 [01:52:24] [Thread   76] Processed 15000/37619 clients, 34.89 clients per 
 second, 00:10:48 remaining

 [01:52:54] [Thread   68] Processed 15970/37619 clients, 34.70 clients per 
 second, 00:10:23 remaining

 [01:52:55] [Thread   17] Processed 16000/37619 clients, 34.69 clients per 
 second, 00:10:23 remaining

 [01:53:25] [Thread   59] Processed 16918/37619 clients, 34.43 clients per 
 second, 00:10:01 remaining

 [01:53:27] [Thread   46] Processed 17000/37619 clients, 34.42 clients per 
 second, 00:09:59 remaining

 [01:53

Re: [Neo4j] Turning Off or Configuring log rotation

2011-09-26 Thread Romiko Derbynew
Hi Peter,

Tatham has created a new thread in this regards .Net client for Neo4j, We 
have CI Build server as he mentions and code is always up to date.

Source Code
http://hg.readify.net/neo4jclient

NuGet (Package Installer)
http://nuget.org/List/Packages/Neo4jClient

Cheers

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Tuesday, 27 September 2011 2:19 AM
To: Neo4j user discussions
Cc: Tatham Oddie
Subject: Re: [Neo4j] Turning Off or Configuring log rotation

Very cool,
glad to hear things work out. Got any code for the .NET bindings? I think we 
should start pulling client libraries into our build system, so there are 
stable versions of the most used clients for Neo4j available as part of the QA 
process.

WDYT?

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 Mon, Sep 26, 2011 at 1:24 PM, Romiko Derbynew romiko.derby...@readify.net 
wrote:
 Hi Peter,

 Indeed our desired result is now achieved. Tatham added batching to our .net 
 client as well. We are more than happy to assist with HA as this is one of 
 the last hurdles we need to overcome. If you can let us know in advance when 
 the release is scheduled then we will incorporate it into our sprint for HA 
 featuring.

 Much appreciated and thx for 1.5 release, could not have timed it better.

 Sent from my iPhone

 On 26/09/2011, at 5:33 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

 Romiko,
 soudns good. Is this solving your current problems or is there stuff
 left to take care of for the moment? Also, there will be some code
 coming out on deploying Neo4j HA on Azure. Would you be interested in
 trying that out and maybe take it a bit further?

 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 Mon, Sep 26, 2011 at 4:16 AM, Romiko Derbynew
 romiko.derby...@readify.net wrote:
 Hi Guys,

 We managed to fix the performance issue.

 * Used Paramterised Queries - increased performance by 1 extra node
 per second, reduced frequency usage of heap thus no jvm memory
 errors
 * Configured our .Net client to use 70 threads for rest calls (I chose this 
 number as Neo4j reserves 80, so I decided 70) 5 TIMES INCREASE IN 
 PERFORMANCE


 We are now going to implement the batching to improve performance
 even more :)

 I have updated the blog post with these findings.
 http://romikoderbynew.com/2011/09/23/neo4j-java-jvm-garbage-collecti
 on-profilingheap-sizelog-rotationlucene-rest-api-performance-analysi
 s/


 I will write a separate post on the improvements from the batching.

 MyStory Welcome, Temporary from MyStory Administration. Logout?
 Agency Import Job 301

 Log output:

 [01:44:58] [Thread   10] Migration message received at: 26/09/2011
 1:44:58 AM +00:00

 [01:44:59] [Thread   10] Migration message payload: JobUniqueId:
 301, AgencyUniqueId: 201

 [01:44:59] [Thread   10] Executing sql script:
 e:\AzureTemp\Resources\4bb24cfd-0b35-4c91-83de-97f335159a49\temp\tem
 p\RoleTemp\634526342992784034\output.sql

 [01:45:01] [Thread   10] Processing script command line 1/37620

 [01:45:03] [Thread   10] Processing script command line 2/37620

 [01:45:05] [Thread   10] Processing script command line 3/37620

 [01:45:06] [Thread   10] All sql script commands executed
 37620/37620

 [01:45:13] [Thread   10] Importing 37619 clients into the database

 [01:45:44] [Thread   12] Processed 169/37619 clients, 5.62 clients
 per second, 01:51:06 remaining

 [01:46:16] [Thread   29] Processed 360/37619 clients, 5.80 clients
 per second, 01:47:02 remaining

 [01:46:29] [Thread   69] Processed 1000/37619 clients, 13.30 clients
 per second, 00:45:52 remaining

 [01:46:50] [Thread   28] Processed 2000/37619 clients, 20.78 clients
 per second, 00:28:34 remaining

 [01:47:11] [Thread   30] Processed 3000/37619 clients, 25.47 clients
 per second, 00:22:39 remaining

 [01:47:33] [Thread   32] Processed 4000/37619 clients, 28.71 clients
 per second, 00:19:31 remaining

 [01:47:55] [Thread   76] Processed 5000/37619 clients, 30.95 clients
 per second, 00:17:33 remaining

 [01:48:18] [Thread   87] Processed 6000/37619 clients, 32.52 clients
 per second, 00:16:12 remaining

 [01:48:46] [Thread   13] Processed 7000/37619

Re: [Neo4j] Turning Off or Configuring log rotation

2011-09-25 Thread Romiko Derbynew
 24000/37619 clients, 32.57 clients per 
second, 00:06:58 remaining

[01:58:01] [Thread   44] Processed 24652/37619 clients, 32.13 clients per 
second, 00:06:43 remaining

[01:58:16] [Thread   42] Processed 25000/37619 clients, 31.94 clients per 
second, 00:06:35 remaining

[01:58:47] [Thread9] Processed 25691/37619 clients, 31.60 clients per 
second, 00:06:17 remaining

[01:59:03] [Thread   84] Processed 26000/37619 clients, 31.33 clients per 
second, 00:06:10 remaining

[01:59:36] [Thread   91] Processed 26625/37619 clients, 30.88 clients per 
second, 00:05:56 remaining

[01:59:57] [Thread   74] Processed 27000/37619 clients, 30.57 clients per 
second, 00:05:47 remaining

[02:00:27] [Thread   79] Processed 27583/37619 clients, 30.20 clients per 
second, 00:05:32 remaining

[02:00:47] [Thread   82] Processed 28000/37619 clients, 30.01 clients per 
second, 00:05:20 remaining

[02:01:17] [Thread   64] Processed 28591/37619 clients, 29.67 clients per 
second, 00:05:04 remaining

[02:01:38] [Thread   17] Processed 29000/37619 clients, 29.46 clients per 
second, 00:04:52 remaining

[02:02:08] [Thread   24] Processed 29610/37619 clients, 29.18 clients per 
second, 00:04:34 remaining

[02:02:29] [Thread   58] Processed 3/37619 clients, 28.98 clients per 
second, 00:04:22 remaining

[02:02:59] [Thread   69] Processed 30566/37619 clients, 28.68 clients per 
second, 00:04:05 remaining

[02:03:23] [Thread   89] Processed 31000/37619 clients, 28.46 clients per 
second, 00:03:52 remaining

[02:03:23] [Thread   88] Processed 31000/37619 clients, 28.46 clients per 
second, 00:03:52 remaining

[02:03:53] [Thread   30] Processed 31556/37619 clients, 28.18 clients per 
second, 00:03:35 remaining

[02:04:16] [Thread   61] Processed 32000/37619 clients, 28.00 clients per 
second, 00:03:20 remaining

[02:04:48] [Thread   66] Processed 32568/37619 clients, 27.73 clients per 
second, 00:03:02 remaining

[02:05:18] [Thread   20] Processed 33000/37619 clients, 27.41 clients per 
second, 00:02:48 remaining

[02:05:48] [Thread   13] Processed 33529/37619 clients, 27.16 clients per 
second, 00:02:30 remaining

[02:06:15] [Thread   56] Processed 34000/37619 clients, 26.95 clients per 
second, 00:02:14 remaining

[02:06:45] [Thread   92] Processed 34442/37619 clients, 26.66 clients per 
second, 00:01:59 remaining

[02:07:16] [Thread   95] Processed 34959/37619 clients, 26.44 clients per 
second, 00:01:40 remaining

[02:07:17] [Thread   91] Processed 35000/37619 clients, 26.44 clients per 
second, 00:01:39 remaining

[02:07:49] [Thread   95] Processed 35369/37619 clients, 26.09 clients per 
second, 00:01:26 remaining

[02:08:19] [Thread   41] Processed 35867/37619 clients, 25.88 clients per 
second, 00:01:07 remaining

[02:08:28] [Thread   66] Processed 36000/37619 clients, 25.81 clients per 
second, 00:01:02 remaining

[02:08:59] [Thread   45] Processed 36485/37619 clients, 25.60 clients per 
second, 00:00:44 remaining

[02:09:29] [Thread   78] Processed 36922/37619 clients, 25.37 clients per 
second, 00:00:27 remaining

[02:09:34] [Thread   81] Processed 37000/37619 clients, 25.34 clients per 
second, 00:00:24 remaining

[02:10:04] [Thread   12] Processed 37287/37619 clients, 25.01 clients per 
second, 00:00:13 remaining

[02:10:27] [Thread   10] All 37619 clients imported


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Romiko Derbynew
Sent: Friday, 23 September 2011 1:06 PM
To: Neo4j user discussions
Cc: Tatham Oddie
Subject: Re: [Neo4j] Turning Off or Configuring log rotation

Apologise.
Issue Number: https://github.com/neo4j/community/issues/28
Blog: http://bit.ly/r9hBZC

Cheers

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Romiko Derbynew
Sent: Friday, 23 September 2011 12:52 PM
To: Neo4j user discussions
Cc: Tatham Oddie
Subject: Re: [Neo4j] Turning Off or Configuring log rotation

Hi Peter,

We solved the issue by disable index creations when importing 1000's of nodes. 
So we will need to figure out why Lucene Index creations via the rest api 
causes so much instability. Below is the history of work done. I have also 
published a blog report on this here:


I have created an issue with this email as the content. Issue number is: INSERT 
ISSUE NUMBER http://bit.ly/r9hBZC


Also the circuit breaker did not get triggered at all, which means the REST API 
is responding with 100% uptime when just doing the insert nodes/relationships. 
I guess we then have a performance issue with the Lucene side. I am more than 
willing to try collect information on this for you, if I enable FINEST log 
setting, will we be able to get details from neo4j about the lucene issue and 
why it causes such problems?


Troubleshoot log:

I managed to disable the tx logging via the console in the emebedded web 
server, and then ran an import.

* Each Node that gets inserted - does a query, insert node, insert index

Re: [Neo4j] Turning Off or Configuring log rotation

2011-09-22 Thread Romiko Derbynew
Hi,

It's the database logging, I'm finding the transaction logs are causing the 
rest API to become unresponsive when it flushes to disk. Basically just want to 
turn it off or set the tlog size by configuration and not via code sample as it 
is demonstrated in the performance guide. 

The current work around without this setting is a circuit breaker pattern. But 
I am very concerned as the DB flush should not slow down further rest calls :(

Sent from my iPhone

On 22/09/2011, at 6:36 PM, Peter Neubauer peter.neuba...@neotechnology.com 
wrote:

 Romiko,
 which log files are you referring to? For the database transaction log
 rotation, look at the neo4j.properties file to tune things, see
 http://docs.neo4j.org/chunked/snapshot/server-configuration.html
 
 For the server, there is logging.properties to tweak stuff. Note that
 these settings require a restart to take effect.
 
 HTH
 
 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 22, 2011 at 1:38 AM, Romiko Derbynew
 romiko.derby...@readify.net wrote:
 Hi,
 
 I am using Neo4j on a Windows Server, is there any way I can configure log 
 rotation via the configuration files? I would like to turn it off or try a 
 different log rotation size. Since I am on windows, I am not sure how I 
 would do it at runtime.
 
 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


Re: [Neo4j] Turning Off or Configuring log rotation

2011-09-22 Thread Romiko Derbynew
Hi Peter,

I think this will be ok via gremlin. Have you got any sample gremlin code that 
can do this, that would be much appreciated. Also in the long term I think a 
combo of tx logs + rest API batching will be the solution. 

Sent from my iPhone

On 22/09/2011, at 10:08 PM, Peter Neubauer peter.neuba...@neotechnology.com 
wrote:

 Romiko,
 I would suggest to do the TX log config via Gremlin for the time
 being, so you can resolve it via scripting. For the exposure of the Tx
 log rotate size as a configuration property (there are logs for every
 XA resource participating in a transaction), please raise an issue at
 https://github.com/neo4j/community/issues - good input!
 
 For the flushing to disk, we will merge a Deferred Write feature back
 into master soonish (after 1.5) which lets the OS decide when to
 flush, if you can stand the risk of a lost flush if things go down.
 The REST interface is waiting for the TX to be finished, which is why
 it is slowing down when you have big flushes. See
 https://github.com/neo4j/community/issues/18 for the ticket on this :)
 
 Would that be ok?
 
 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 22, 2011 at 1:52 PM, Romiko Derbynew
 romiko.derby...@readify.net wrote:
 Hi,
 
 It's the database logging, I'm finding the transaction logs are causing the 
 rest API to become unresponsive when it flushes to disk. Basically just want 
 to turn it off or set the tlog size by configuration and not via code sample 
 as it is demonstrated in the performance guide.
 
 The current work around without this setting is a circuit breaker pattern. 
 But I am very concerned as the DB flush should not slow down further rest 
 calls :(
 
 Sent from my iPhone
 
 On 22/09/2011, at 6:36 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:
 
 Romiko,
 which log files are you referring to? For the database transaction log
 rotation, look at the neo4j.properties file to tune things, see
 http://docs.neo4j.org/chunked/snapshot/server-configuration.html
 
 For the server, there is logging.properties to tweak stuff. Note that
 these settings require a restart to take effect.
 
 HTH
 
 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 22, 2011 at 1:38 AM, Romiko Derbynew
 romiko.derby...@readify.net wrote:
 Hi,
 
 I am using Neo4j on a Windows Server, is there any way I can configure log 
 rotation via the configuration files? I would like to turn it off or try a 
 different log rotation size. Since I am on windows, I am not sure how I 
 would do it at runtime.
 
 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
 
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Turning Off or Configuring log rotation

2011-09-22 Thread Romiko Derbynew
Hi Peter,

Thank you so much for the tips, will look into this today and see what I can 
come up with. After my musings will definitely file for new features e.g
* Batching via rest api (Being on .Net we rely solely on the Rest API)
* Configuration level control of transaction log default sizes e.g. 10mb - 
100mb, disabled
* Explore ways to optimise flushing to disk without affecting the rest api

Regards

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Friday, 23 September 2011 7:28 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Turning Off or Configuring log rotation

Romiko,
Gremlin is basically executing Java on the server side and thus can do anything 
java can do.
http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-an-arbitrary-groovy-script---lucene-sorting
has an example of mixing native Neo4j API calls (g.createNode() etc) after 
obtaining the injected Neo4j DB instance with

g.getRawGraph(), in this case using Neo4j Index sorting.

After that, just call the log rotation code. Let me know how it works out, 
otherwise I can provide an example tomorrow?

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 22, 2011 at 11:17 PM, Romiko Derbynew romiko.derby...@readify.net 
wrote:
 Hi Peter,

 I think this will be ok via gremlin. Have you got any sample gremlin code 
 that can do this, that would be much appreciated. Also in the long term I 
 think a combo of tx logs + rest API batching will be the solution.

 Sent from my iPhone

 On 22/09/2011, at 10:08 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

 Romiko,
 I would suggest to do the TX log config via Gremlin for the time 
 being, so you can resolve it via scripting. For the exposure of the 
 Tx log rotate size as a configuration property (there are logs for 
 every XA resource participating in a transaction), please raise an 
 issue at https://github.com/neo4j/community/issues - good input!

 For the flushing to disk, we will merge a Deferred Write feature back 
 into master soonish (after 1.5) which lets the OS decide when to 
 flush, if you can stand the risk of a lost flush if things go down.
 The REST interface is waiting for the TX to be finished, which is why 
 it is slowing down when you have big flushes. See
 https://github.com/neo4j/community/issues/18 for the ticket on this 
 :)

 Would that be ok?

 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 22, 2011 at 1:52 PM, Romiko Derbynew 
 romiko.derby...@readify.net wrote:
 Hi,

 It's the database logging, I'm finding the transaction logs are causing the 
 rest API to become unresponsive when it flushes to disk. Basically just 
 want to turn it off or set the tlog size by configuration and not via code 
 sample as it is demonstrated in the performance guide.

 The current work around without this setting is a circuit breaker 
 pattern. But I am very concerned as the DB flush should not slow 
 down further rest calls :(

 Sent from my iPhone

 On 22/09/2011, at 6:36 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

 Romiko,
 which log files are you referring to? For the database transaction 
 log rotation, look at the neo4j.properties file to tune things, see 
 http://docs.neo4j.org/chunked/snapshot/server-configuration.html

 For the server, there is logging.properties to tweak stuff. Note 
 that these settings require a restart to take effect.

 HTH

 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 22, 2011 at 1:38 AM, Romiko Derbynew 
 romiko.derby...@readify.net wrote:
 Hi,

 I am using Neo4j on a Windows Server, is there any way I can configure 
 log rotation via the configuration files? I would like to turn it off or 
 try a different log rotation size. Since I am on windows, I am not sure 
 how I would do

[Neo4j] Error in performance docs - Stack Size

2011-09-21 Thread Romiko Derbynew
Hi Guys,

I think there is an error in the performance docs. I am currently tuning the 
stack size as we use multiple threads, however, I see this in the docs:
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Error in performance docs - Stack Size

2011-09-21 Thread Romiko Derbynew
Sorry, clicked wrong button:
http://wiki.neo4j.org/content/Configuration_Settings

The stack size is set by specifying the -Xss???m parameter to hotspot, where 
??? is the stack size in megabytes.

As far as I am aware, according to this document:
http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp#stack-size
The stack size in in kilobytes, which kind a makes sense.
-Xss determines the size of the stack: -Xss1024k

Please confirm?

From: Romiko Derbynew
Sent: Thursday, 22 September 2011 11:19 AM
To: 'user@lists.neo4j.org'
Subject: Error in performance docs - Stack Size

Hi Guys,

I think there is an error in the performance docs. I am currently tuning the 
stack size as we use multiple threads, however, I see this in the docs:
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Turning Off or Configuring log rotation

2011-09-21 Thread Romiko Derbynew
Hi,

I am using Neo4j on a Windows Server, is there any way I can configure log 
rotation via the configuration files? I would like to turn it off or try a 
different log rotation size. Since I am on windows, I am not sure how I would 
do it at runtime.

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


Re: [Neo4j] Error in performance docs - Stack Size

2011-09-21 Thread Romiko Derbynew
AAh, excellent, thank for that, I guess stack sizes should be in the 1024k 
range though not 1024m on 64 bit machines?

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Linan Wang
Sent: Thursday, 22 September 2011 11:37 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Error in performance docs - Stack Size

k/m/g all work. just tried on 1.6.

On Thu, Sep 22, 2011 at 2:22 AM, Romiko Derbynew romiko.derby...@readify.net 
wrote:
 Sorry, clicked wrong button:
 http://wiki.neo4j.org/content/Configuration_Settings

 The stack size is set by specifying the -Xss???m parameter to hotspot, where 
 ??? is the stack size in megabytes.

 As far as I am aware, according to this document:
 http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp#stack-size
 The stack size in in kilobytes, which kind a makes sense.
 -Xss determines the size of the stack: -Xss1024k

 Please confirm?

 From: Romiko Derbynew
 Sent: Thursday, 22 September 2011 11:19 AM
 To: 'user@lists.neo4j.org'
 Subject: Error in performance docs - Stack Size

 Hi Guys,

 I think there is an error in the performance docs. I am currently tuning the 
 stack size as we use multiple threads, however, I see this in the docs:
 ___
 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

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


Re: [Neo4j] Garbage Collection not in wrapper config

2011-09-19 Thread Romiko Derbynew
Hi Thank you. Indeed, I have it now added manually. Will remove it from our 
code when we upgrade and just uncomment the value.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Chris Gioran
Sent: Monday, 19 September 2011 3:57 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Garbage Collection not in wrapper config

Hi,

if i understand you correctly, you are looking at the documentation for 
snapshot (currently 1.5) but looking at the configuration file from the 1st 
milestone of 1.4 (1.4.M01).

From what git history shows, these lines was added on May 30, 2011, which 
places them in the distribution around 1.4M04.

Anyway, i just downloaded a community snapshot (1.5-SNAPSHOT) from neo4j.org 
and conf/neo4j-wrapper.conf has the expected contents, lines 8-9.

Is there something that i am missing here?

Note that adding manually this line in the configuration in versions before 
1.4M04 should work as expected.

cheers,
CG

On Mon, Sep 19, 2011 at 8:16 AM, Romiko Derbynew romiko.derby...@readify.net 
wrote:
 Hi Guys,

 I notice the docs 
 (http://docs.neo4j.org/chunked/snapshot/server-configuration.html) mention 
 that this line of config exists commented out.

 However, I cannot find it in the neo4j-wrapper.conf 
 wrapper.java.additional.3=-Xloggc:data/log/neo4j-gc.log (1.4.M01 
 (2011-04-28)

 Is the docs out of date, or should this be added back, I see it as a very 
 useful tool to leave commented out, as I can use this with gcviewer?

 Romiko


 ___
 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] Garbage Collection not in wrapper config

2011-09-18 Thread Romiko Derbynew
Hi Guys,

I notice the docs 
(http://docs.neo4j.org/chunked/snapshot/server-configuration.html) mention that 
this line of config exists commented out.

However, I cannot find it in the neo4j-wrapper.conf
wrapper.java.additional.3=-Xloggc:data/log/neo4j-gc.log (1.4.M01 (2011-04-28)

Is the docs out of date, or should this be added back, I see it as a very 
useful tool to leave commented out, as I can use this with gcviewer?

Romiko


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


Re: [Neo4j] Querying a full text index

2011-09-08 Thread Romiko Derbynew
Remember that the default match is 0.5 e.g director~0.5 hence why it matches up 
to two letter differences e.g ditectof, directors etc

Sent from my iPhone

On 08/09/2011, at 5:10 AM, Yaniv Ben Yosef yani...@gmail.com wrote:

 Hi Axel,
 
 I've read the syntax, which is why I was surprised. There are wildcard
 options in the syntax, e.g.: test* and test? and even te*st.
 So I would expect that [director*] should return director and directory.
 [director], if I understand the syntax correctly, should return just
 director.
 But actually, it also returns director and directory in my code.
 This means that [director] is equivalent to [director*], which I find a bit
 strange.
 
 In your example - the query [director] also returns both director and
 directory.
 The only thing that works is [+director].
 
 Thing is, I don't want to force my users to remember advanced syntax and
 append a + to each word. And I also don't want to start parsing queries.
 I imagine that the syntax in the Lucene documentation should work (i.e.,
 [director] *should not* be equivalent to [director*]. It's either a bug
 somewhere, or I'm not configuring/using something correctly.
 Anyone has an idea?
 
 Thanks again,
 
 --- Yaniv
 
 
 
 On Wed, Sep 7, 2011 at 8:31 PM, Axel Morgner a...@morgner.de wrote:
 
 Hi Yaniv,
 
 didn't try your case, just read the code. If I remember correctly, it may
 help to expand your search term director john into a Lucene query, e.g.
 something like \director\ OR \john\.
 
 The complete Lucene query syntax see [1].
 
 Greetings
 
 Axel
 
 [1] http://lucene.apache.org/java/3_1_0/queryparsersyntax.html
 
 Am 07.09.2011 um 12:16 schrieb Yaniv Ben Yosef:
 
 Hi,
 
 This question may be Lucene related, but since I'm using it via Neo4J I'm
 asking here first. I'm using Neo4J 1.4 M06.
 I have a graph representing people, with a few properties about each
 person
 (e.g., their name and job title).
 Now I'd like to create a search form that will allow the user to enter
 either the person's first name, last name, title, or any combination. For
 example, the query [john director] should result with all the people
 whose
 name or title contain both john and director.
 To play with that, I created this little psvm:
 
 public class FullTextIndexTest
 {
   public static void main(String[] args)
   {
   GraphDatabaseService graphDb =
 GraphDatabaseServiceFactory.createGraphDatabase(target/var/db);
 
   Transaction t = graphDb.beginTx();
   Node n1 = graphDb.createNode();
   n1.setProperty(name, John Smith);
   n1.setProperty(title, Directory Manager);
 
   Node n2 = graphDb.createNode();
   n2.setProperty(name, Johnny Malkovich);
   n2.setProperty(title, Director of RD);
 
   Node n3 = graphDb.createNode();
   n3.setProperty(name, John Horovich);
   n3.setProperty(title, Sr. Director);
 
   IndexManager index = graphDb.index();
   IndexNode fulltextPerson = index.forNodes(person-fulltext,
   MapUtil.stringMap(IndexManager.PROVIDER, lucene, type,
 fulltext));
   fulltextPerson.add(n1, combined, n1.getProperty(name) +   +
 n1.getProperty(title));
   fulltextPerson.add(n2, combined, n2.getProperty(name) +   +
 n2.getProperty(title));
   fulltextPerson.add(n3, combined, n3.getProperty(name) +   +
 n3.getProperty(title));
   t.success();
   t.finish();
 
   // search in the fulltext index
   IndexHitsNode hits = fulltextPerson.query(combined, director
 john);
   System.out.printf(Found %d results:\n, hits.size());
   for (Node node : hits)
   {
   System.out.println(node.getProperty(name) + ,  +
 node.getProperty(title));
   }
   }
 }
 
 
 I expected this program to return 1 result: John Horovich, Sr. Director
 Instead, I'm getting 3:
 
 John Horovich, Sr. Director
 John Smith, Directory Manager
 Johnny Malkovich, Director of RD
 
 It seems that Lucene will accept terms that contain a query term (e.g,
 Directory and Johnny) even if I'm not using any wildcards in my query.
 How
 do I turn this behavior off? I'd like the results to contain only people
 whose name or title *contain* the word john, but not johnny.
 
 Thanks!
 --- Yaniv
 ___
 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


Re: [Neo4j] Neo4j .Net Api - Indexing

2011-08-28 Thread Romiko Derbynew
Thx man!

Sent from my iPhone

On 28/08/2011, at 8:18 PM, Tatham Oddie tat...@oddie.com.au wrote:

 Hi Peter,
 
 The client library is on NuGet: 
 http://nuget.org/List/Packages/Neo4jClient.Edge
 
 (NuGet is .NET's package manager.)
 
 The source code is up at http://hg.tath.am/neo4jclient
 
 I haven't pushed it to GitHub yet because of a bug in Dulwich affecting my 
 version of Hg-Git. (Empty repo at https://github.com/tathamoddie/Neo4jClient 
 where it'll go eventually.)
 
 
 
 -- Tatham
 
 
 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
 Behalf Of Peter Neubauer
 Sent: Sunday, 28 August 2011 5:55 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Neo4j .Net Api - Indexing
 
 Romiko,
 Nice writeup! Do you have the link to the full project for people to try? Is 
 it on GIThub for people to try?
 
 /peter
 
 On Sunday, August 28, 2011, Romiko Derbynew romiko.derby...@readify.net
 wrote:
 Hi Guys,
 
 I have written a blog on using our .Net Api for indexes in .Net, so 
 any
 .Net dudes out there might want to give it a bash, look forward hearing 
 feedback.
 
 http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-ne
 o4j/
 
 Cheers
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 -- 
 
 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.
 ___
 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] Neo4j .Net Api - Indexing

2011-08-28 Thread Romiko Derbynew
Hi Peter,

We been doing some work on Azure Cloud deployment. At some point I will put a 
blog post up on it when I find a moment. Some aspects of it in regards to 
automatic deployment (not bootstrapping) is on this blog, you will notice the 
PowerShell scripts in the blog below pertain to getting neo4j binaries from 
blog storage. The next blog will cover the actual hosting of Neo4j as a worker 
role off the blob and cloud drive.

http://romikoderbynew.com/2011/08/12/automating-windows-azure-deployments-leveraging-teamcityartefacts-and-powershell/




-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Monday, 29 August 2011 2:05 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Neo4j .Net Api - Indexing

Cool Tatham,
Thanks for sharing, let us know your progress - there is also work going on to 
deploy Neo4j Server on Azure, let me know if you are interested in testing or 
helping out there!

/peter

On Sunday, August 28, 2011, Tatham Oddie tat...@oddie.com.au wrote:
 Hi Peter,

 The client library is on NuGet:
http://nuget.org/List/Packages/Neo4jClient.Edge

 (NuGet is .NET's package manager.)

 The source code is up at http://hg.tath.am/neo4jclient

 I haven't pushed it to GitHub yet because of a bug in Dulwich 
 affecting my
version of Hg-Git. (Empty repo at
https://github.com/tathamoddie/Neo4jClientwhere it'll go eventually.)



 -- Tatham


 -Original Message-
 From: user-boun...@lists.neo4j.org 
 [mailto:user-boun...@lists.neo4j.org]
On Behalf Of Peter Neubauer
 Sent: Sunday, 28 August 2011 5:55 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Neo4j .Net Api - Indexing

 Romiko,
 Nice writeup! Do you have the link to the full project for people to try?
Is it on GIThub for people to try?

 /peter

 On Sunday, August 28, 2011, Romiko Derbynew 
 romiko.derby...@readify.net
 wrote:
 Hi Guys,

 I have written a blog on using our .Net Api for indexes in .Net, so 
 any
 .Net dudes out there might want to give it a bash, look forward 
 hearing
feedback.

 http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-n
 e
 o4j/

 Cheers

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


 --

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


-- 

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.
___
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] Neo4j .Net Api - Indexing

2011-08-28 Thread Romiko Derbynew
The Package and Source Code is now officially available here:
http://nuget.org/List/Packages/Neo4jClient
Source Code at:
http://hg.readify.net/neo4jclient/


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Tatham Oddie
Sent: Sunday, 28 August 2011 8:14 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Neo4j .Net Api - Indexing

Hi Peter,

The client library is on NuGet: http://nuget.org/List/Packages/Neo4jClient.Edge

(NuGet is .NET's package manager.)

The source code is up at http://hg.tath.am/neo4jclient

I haven't pushed it to GitHub yet because of a bug in Dulwich affecting my 
version of Hg-Git. (Empty repo at https://github.com/tathamoddie/Neo4jClient 
where it'll go eventually.)



-- Tatham


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Sunday, 28 August 2011 5:55 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Neo4j .Net Api - Indexing

Romiko,
Nice writeup! Do you have the link to the full project for people to try? Is it 
on GIThub for people to try?

/peter

On Sunday, August 28, 2011, Romiko Derbynew romiko.derby...@readify.net
wrote:
 Hi Guys,

 I have written a blog on using our .Net Api for indexes in .Net, so 
 any
.Net dudes out there might want to give it a bash, look forward hearing 
feedback.

 http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-ne
 o4j/

 Cheers

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


-- 

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.
___
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] Neo4j .Net Api - Indexing

2011-08-27 Thread Romiko Derbynew
Hi Guys,

I have written a blog on using our .Net Api for indexes in .Net, so any .Net 
dudes out there might want to give it a bash, look forward hearing feedback.

http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-neo4j/

Cheers

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


Re: [Neo4j] Fuzzy Search Not Working :(

2011-08-23 Thread Romiko Derbynew
Hi Peter,

Perfect, and it is always nice to have bob in an example :) much appreciated, 
will blog about search and neo4j so I don't forget.

Much appreciated

Sent from my iPhone

On 23/08/2011, at 8:14 PM, Peter Neubauer peter.neuba...@neotechnology.com 
wrote:

 Romiko,
 thanks a lot for the update, I expanded the REST docs a bit to show
 this, see the manual
 http://docs.neo4j.org/chunked/snapshot/rest-api-indexes.html#rest-api-find-node-by-query
 that will be updated shortly from
 https://github.com/neo4j/community/commit/5e5ccfa95e9cc2598840728922e53aef02c8b470
 
 Is that better?
 
 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 Mon, Aug 22, 2011 at 11:52 PM, Romiko Derbynew
 romiko.derby...@readify.net wrote:
 For those that need to work with multiple words.
 This how fuzzy search works with multiple terms, the plus sign is used to 
 separate the surname so the search below will match Bob The Builder , who is 
 of course male :)
 
 
 http://localhost:5102/db/data/index/node/agency1-clients?query=+Name:Bobbie~%20+Name:Builder~%20AND%20Gender:Male
 
 
 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
 Behalf Of Romiko Derbynew
 Sent: Tuesday, 23 August 2011 9:21 AM
 To: User@lists.neo4j.org
 Subject: Re: [Neo4j] Fuzzy Search Not Working :(
 
 Hi Guys,
 
 I got fuzzy search working now, I had to use the query version:
 
 http://localhost:5102/db/data/index/node/agency1-clients?query=Name:Bobbs~
 
 
 :)
 
 From: Romiko Derbynew
 Sent: Monday, 22 August 2011 4:53 PM
 To: 'User@lists.neo4j.org'
 Subject: Fuzzy Search Not Working :(
 
 Hi Guys,
 
 The problem I am having is that I have created multiple index entries
 
 e.g.
 Key:Name Value: Joe
 Key:Name Value: Joe Blogs
 
 Works
 I am now querying the index, and can find  Name:\Joe\
 I am now querying the index, and can find  Name:\Joe\~
 I am now querying the index, and can find  Name:\Joe Blogs\
 I am now querying the index, and can find  Name:\Joe Blogs\~
 
 
 Does Not Work
 I am now querying the index, and can find  Name:\Joey\~ This is not 
 working, I also tried with a low matching value I am now querying the index, 
 and can find  Name:\Joey\~0.1
 I am now querying the index, and can find  Name:\Joey Blogs\~0.1
 
 Please let me know what I am doing wrong here? I have tried doing these in 
 the rest API calls e.g. /index/nodes/myindex/mykey:value~
 
 
 Fi: I have completed building the .Net Api for Lucene Index Searches, Looks 
 like this. If any .Net uses are keen to try out the full Client, it is on 
 NUGet called Neo4jClient.Edge.
 
 
 
 ___
 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] Fuzzy Search Not Working :(

2011-08-22 Thread Romiko Derbynew
Hi Guys,

The problem I am having is that I have created multiple index entries

e.g.
Key:Name Value: Joe
Key:Name Value: Joe Blogs

Works
I am now querying the index, and can find  Name:\Joe\
I am now querying the index, and can find  Name:\Joe\~
I am now querying the index, and can find  Name:\Joe Blogs\
I am now querying the index, and can find  Name:\Joe Blogs\~


Does Not Work
I am now querying the index, and can find  Name:\Joey\~ This is not 
working, I also tried with a low matching value
I am now querying the index, and can find  Name:\Joey\~0.1
I am now querying the index, and can find  Name:\Joey Blogs\~0.1

Please let me know what I am doing wrong here? I have tried doing these in the 
rest API calls e.g. /index/nodes/myindex/mykey:value~


Fi: I have completed building the .Net Api for Lucene Index Searches, Looks 
like this. If any .Net uses are keen to try out the full Client, it is on NUGet 
called Neo4jClient.Edge.



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


Re: [Neo4j] Fuzzy Search Not Working :(

2011-08-22 Thread Romiko Derbynew
Hi Guys,

I got fuzzy search working now, I had to use the query version:

http://localhost:5102/db/data/index/node/agency1-clients?query=Name:Bobbs~


:)

From: Romiko Derbynew
Sent: Monday, 22 August 2011 4:53 PM
To: 'User@lists.neo4j.org'
Subject: Fuzzy Search Not Working :(

Hi Guys,

The problem I am having is that I have created multiple index entries

e.g.
Key:Name Value: Joe
Key:Name Value: Joe Blogs

Works
I am now querying the index, and can find  Name:\Joe\
I am now querying the index, and can find  Name:\Joe\~
I am now querying the index, and can find  Name:\Joe Blogs\
I am now querying the index, and can find  Name:\Joe Blogs\~


Does Not Work
I am now querying the index, and can find  Name:\Joey\~ This is not 
working, I also tried with a low matching value
I am now querying the index, and can find  Name:\Joey\~0.1
I am now querying the index, and can find  Name:\Joey Blogs\~0.1

Please let me know what I am doing wrong here? I have tried doing these in the 
rest API calls e.g. /index/nodes/myindex/mykey:value~


Fi: I have completed building the .Net Api for Lucene Index Searches, Looks 
like this. If any .Net uses are keen to try out the full Client, it is on NUGet 
called Neo4jClient.Edge.



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


Re: [Neo4j] Fuzzy Search Not Working :(

2011-08-22 Thread Romiko Derbynew
For those that need to work with multiple words.
This how fuzzy search works with multiple terms, the plus sign is used to 
separate the surname so the search below will match Bob The Builder , who is of 
course male :)


http://localhost:5102/db/data/index/node/agency1-clients?query=+Name:Bobbie~%20+Name:Builder~%20AND%20Gender:Male


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Romiko Derbynew
Sent: Tuesday, 23 August 2011 9:21 AM
To: User@lists.neo4j.org
Subject: Re: [Neo4j] Fuzzy Search Not Working :(

Hi Guys,

I got fuzzy search working now, I had to use the query version:

http://localhost:5102/db/data/index/node/agency1-clients?query=Name:Bobbs~


:)

From: Romiko Derbynew
Sent: Monday, 22 August 2011 4:53 PM
To: 'User@lists.neo4j.org'
Subject: Fuzzy Search Not Working :(

Hi Guys,

The problem I am having is that I have created multiple index entries

e.g.
Key:Name Value: Joe
Key:Name Value: Joe Blogs

Works
I am now querying the index, and can find  Name:\Joe\
I am now querying the index, and can find  Name:\Joe\~
I am now querying the index, and can find  Name:\Joe Blogs\
I am now querying the index, and can find  Name:\Joe Blogs\~


Does Not Work
I am now querying the index, and can find  Name:\Joey\~ This is not 
working, I also tried with a low matching value I am now querying the index, 
and can find  Name:\Joey\~0.1
I am now querying the index, and can find  Name:\Joey Blogs\~0.1

Please let me know what I am doing wrong here? I have tried doing these in the 
rest API calls e.g. /index/nodes/myindex/mykey:value~


Fi: I have completed building the .Net Api for Lucene Index Searches, Looks 
like this. If any .Net uses are keen to try out the full Client, it is on NUGet 
called Neo4jClient.Edge.



___
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] Indexing - Rest Api

2011-08-19 Thread Romiko Derbynew
Hi Jim

Thanks for the response. I have built a .Net API to manage manual indexes. So 
basically when I create a node I have an option to parse in a collection of 
key/Val pairs to index the node. I'm using Lucene and fulltext.

However it sounds like auto indexing might be a better option? I avoided it as 
the docs mention experimental and I was not sure if you can configure exactly 
which fields to index, but it seems after reading your profile that this is 
possible via config. So is it possible via config to do this:

Imagine a customer node, with firstname, lastname, preferredname.

In my current implementtion I add the following into ONE fulltext index
Key:Name
Value permutations for same key:
Fn
Ln
Pn
Fn ln
Pn ln

This means people can search 
bob brown
Bobby brown
Brown
Bob
Bobby
Bo~
browns~

How would you configure this in the config file for autoindexing? I did not 
know that autoindexing could be fine grained control, which will make code 
maintenance much easier.

The last question then is when should manual be used over auto?

Much appreciated.

Sent from my iPhonen

On 17/08/2011, at 12:19 AM, Jim Webber j...@neotechnology.com wrote:

 G'day Romiko,
 
 *   Configuration File: Autoindexing enabled here is related to 
 automatically indexing all nodes and relationships?
 *
 
 If I want to add a node to an index following the guidelines, what 
 convention should be used for the Key/Value naming? Imagine we have nodes of 
 type Customers, and we have 1 customers, what sort of key/value would we 
 set for each customer, as I would guess that all properties are indexed for 
 the node? Would it be perhaps a unique auto increment number for example 
 that is in no way related to the data node?
 
 The basic mechanics are straightforward: Assuming you've configured your 
 indexes 
 (http://docs.neo4j.org/chunked/snapshot/auto-indexing.html#auto-indexing-config),
  then there's nothing more to do. Every time you encounter a node (or 
 relationship) with one of the properties that you declared in your config, 
 it'll be added to the index if it wasn't before, and the property value will 
 be in sync with the value in the node (or relationship).
 
 Only the properties that you ask to be auto-indexed will be. So in your case, 
 you might well have an auto index config that indexes only (say) customer_id 
 and doesn't care about other properties.
 
 *   Also, how can we control the properties/fields to index when we add 
 a node to an index with the RestApi, I would imagine we would not want to 
 index all fields on a node via the auto indexing feature?
 
 
 At the moment you can't control auto indexing through the REST API, you can 
 only use auto indexes that have been configured on the server. I recall Jake 
 (I think) mentioning this before, and it boils down to the fact that we don't 
 mutate config (and so changes to auto index config isn't persisted across DB 
 restarts). Once we figure out how to persist things like config in a 
 database, we'll get stuck into that :-)
 
 Jim
 
 PS - thanks for prompting on this, it's triggered a good refactoring and 
 cleanup of the index functional tests.
 ___
 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] Indexing - Rest Api

2011-08-19 Thread Romiko Derbynew
Jim,

To try answer my own question for auto bs manual. 

One think I like with manual is a situation where a client had multiple 
alsoknownas names which is a relationship IS_ALSO_KNOWN_AS

Now in this case with manual index I can actualy index a reference to client 
node using fields from nodes related to the client

Fn
Ln
Fn ln
Aka
Aka ln

So the last two index entries point to the Client Node address, this is great 
since in rest API we can control the node to point to for manual indexes, and 
thus I guess is why they perhaps are preferred over automatic.

But automatic is good for simple one to one non composite values??

Cheers

Sent from my iPhone

On 20/08/2011, at 9:10 AM, Romiko Derbynew romiko.derby...@readify.net 
wrote:

 Hi Jim
 
 Thanks for the response. I have built a .Net API to manage manual indexes. So 
 basically when I create a node I have an option to parse in a collection of 
 key/Val pairs to index the node. I'm using Lucene and fulltext.
 
 However it sounds like auto indexing might be a better option? I avoided it 
 as the docs mention experimental and I was not sure if you can configure 
 exactly which fields to index, but it seems after reading your profile that 
 this is possible via config. So is it possible via config to do this:
 
 Imagine a customer node, with firstname, lastname, preferredname.
 
 In my current implementtion I add the following into ONE fulltext index
 Key:Name
 Value permutations for same key:
 Fn
 Ln
 Pn
 Fn ln
 Pn ln
 
 This means people can search 
 bob brown
 Bobby brown
 Brown
 Bob
 Bobby
 Bo~
 browns~
 
 How would you configure this in the config file for autoindexing? I did not 
 know that autoindexing could be fine grained control, which will make code 
 maintenance much easier.
 
 The last question then is when should manual be used over auto?
 
 Much appreciated.
 
 Sent from my iPhonen
 
 On 17/08/2011, at 12:19 AM, Jim Webber j...@neotechnology.com wrote:
 
 G'day Romiko,
 
 *   Configuration File: Autoindexing enabled here is related to 
 automatically indexing all nodes and relationships?
 *
 
 If I want to add a node to an index following the guidelines, what 
 convention should be used for the Key/Value naming? Imagine we have nodes 
 of type Customers, and we have 1 customers, what sort of key/value 
 would we set for each customer, as I would guess that all properties are 
 indexed for the node? Would it be perhaps a unique auto increment number 
 for example that is in no way related to the data node?
 
 The basic mechanics are straightforward: Assuming you've configured your 
 indexes 
 (http://docs.neo4j.org/chunked/snapshot/auto-indexing.html#auto-indexing-config),
  then there's nothing more to do. Every time you encounter a node (or 
 relationship) with one of the properties that you declared in your config, 
 it'll be added to the index if it wasn't before, and the property value will 
 be in sync with the value in the node (or relationship).
 
 Only the properties that you ask to be auto-indexed will be. So in your 
 case, you might well have an auto index config that indexes only (say) 
 customer_id and doesn't care about other properties.
 
 *   Also, how can we control the properties/fields to index when we add 
 a node to an index with the RestApi, I would imagine we would not want to 
 index all fields on a node via the auto indexing feature?
 
 
 At the moment you can't control auto indexing through the REST API, you can 
 only use auto indexes that have been configured on the server. I recall Jake 
 (I think) mentioning this before, and it boils down to the fact that we 
 don't mutate config (and so changes to auto index config isn't persisted 
 across DB restarts). Once we figure out how to persist things like config in 
 a database, we'll get stuck into that :-)
 
 Jim
 
 PS - thanks for prompting on this, it's triggered a good refactoring and 
 cleanup of the index functional tests.
 ___
 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] Indexing - Rest Api

2011-08-12 Thread Romiko Derbynew
Hi,

I am planning to extend the .Net client that we use for CRUD operation and now 
add indexing support. I am keen to go the route of AutoIndexing, so we just 
query the index and it automatically gets create. Just a few questions.

*   Configuration File: Autoindexing enabled here is related to 
automatically indexing all nodes and relationships?
*

If I want to add a node to an index following the guidelines, what convention 
should be used for the Key/Value naming? Imagine we have nodes of type 
Customers, and we have 1 customers, what sort of key/value would we set for 
each customer, as I would guess that all properties are indexed for the node? 
Would it be perhaps a unique auto increment number for example that is in no 
way related to the data node?
e.g.
Example request
*

POST http://localhost:7474/db/data/index/node/favorites/key/the%20value
*   Accept: application/json
*   Content-Type: application/json
http://localhost:7474/db/data/node/0

*   Also, how can we control the properties/fields to index when we add a 
node to an index with the RestApi, I would imagine we would not want to index 
all fields on a node via the auto indexing feature?

Our plan is to use Lucene Search Queries so we can do funzzy searches, however, 
we would like to leverage autoindexing but have the option to choose exactly 
what fields we want to index on a node when we add nodes to indexes.

Thank You.

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


[Neo4j] Neo4J Gremlin Query for dates

2011-07-29 Thread Romiko Derbynew
Hi Guys,

I have dates in Neo4j stored as JSON Dates.

e.g.
DateCreated: /Date(1310360656147+)/

LastLogin: /Date(1311927251851+)/

I use the iterator and lambda way of query data

e.g.
g.v(0).outE[[label:'HOSTS']].inV{it.'Name'.compareTo('Agency1') == 0}.Name

However I want to compare dates, what is the format we can use for this? 
Currently we have written a .Net client to consume Neo4J and I we have a 
formatter in the client api that converts c# lambda's to java lambda's, so it 
would be nice to know the best way to do date comparisons :)

e.g.
g.v(0).outE[[label:'HOSTS']].inV{it.'LastLogin'.dateCompareTo('/Date(1311927251851+)/')
 == 0}.Name

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


[Neo4j] neo4j.bat - java path

2011-07-29 Thread Romiko Derbynew
Hi Guys,

Is it possible to update the neo4j.bat file for future releases to have a 
global variable for java 

Currently it is located in two places in the file neo4j.bat. We using  Neo4j in 
the cloud and currently we have to do string replacements at two locations:

e.g. - these are my configs that work on dev fabric as I do not rely on 
environment paths since java and neo4j are boot strapped from blob storage and 
the db is on a cloud drive.
INSTALL SECTION
set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
set binPath=java -DworkingDir...

CONSOLE SECTION
set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
java -DworkingDir=%~dp0..

Perhaps it would be easier to have one location to store this value, to make it 
easier to use absolute paths for java. We use absolute paths due to Azure VM's.

e.g.
$Java_Path  
=e:\AzureTemp\s0\deployment(337)\res\deployment(337).Neo4j.Azure.Server.Neo4jServerHost.0\directory\Neo4jInst\jre6\bin\java.exe
 

And then
set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
set binPath=$Java_Path -DworkingDir...

CONSOLE SECTION
set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
$Java_Path  -DworkingDir=%~dp0..

We use auto configuration in the cloud, so we always customize the configs on 
the fly when vm's spin up. Easier way to search and replace strings would be 
much appreciated. This will make it much easier for us to customize the config 
on the fly by just replacing $Java_Path.

e.g. after boot strap in the cloud.
:install
set 
classpath=-DserverClasspath=lib/*.jar;system/lib/*.jar;plugins/*.jar;system/coordinator/lib/*.jar
set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
set 
binPath=e:\AzureTemp\s0\deployment(337)\res\deployment(337).Neo4j.Azure.Server.Neo4jServerHost.0\directory\Neo4jInst\jre6\bin\java.exe
 -DworkingDir=%~dps0.. -DconfigFile=conf\neo4j-wrapper.conf %classpath% 
%mainclass% -jar %~dps0windows-service-wrapper-1.jar %serviceName%
and
:console
set 
classpath=-DserverClasspath=lib/*.jar;system/lib/*.jar;plugins/*.jar;system/coordinator/lib/*.jar
set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
e:\AzureTemp\s0\deployment(337)\res\deployment(337).Neo4j.Azure.Server.Neo4jServerHost.0\directory\Neo4jInst\jre6\bin\java.exe
 -DworkingDir=%~dp0.. -DconfigFile=conf\neo4j-wrapper.conf %classpath% 
%mainclass% -jar %~dp0windows-service-wrapper-1.jar



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


Re: [Neo4j] neo4j.bat - java path

2011-07-29 Thread Romiko Derbynew
Thank You.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Chris Gioran
Sent: Friday, 29 July 2011 9:18 PM
To: Neo4j user discussions
Cc: Jamal Abreu (jab...@barnardos.org.au); Tatham Oddie
Subject: Re: [Neo4j] neo4j.bat - java path

Hi,

that is a valid complaint. The main idea was to use the java executable that is 
on the Path - however that can be still the case and allow for custom 
executable locations with just one string substitution.
Consider this added into the backlog.

cheers,
CG

On Fri, Jul 29, 2011 at 2:04 PM, Romiko Derbynew romiko.derby...@readify.net 
wrote:
 Hi Guys,

 Is it possible to update the neo4j.bat file for future releases to have a 
 global variable for java 

 Currently it is located in two places in the file neo4j.bat. We using  Neo4j 
 in the cloud and currently we have to do string replacements at two locations:

 e.g. - these are my configs that work on dev fabric as I do not rely on 
 environment paths since java and neo4j are boot strapped from blob storage 
 and the db is on a cloud drive.
 INSTALL SECTION
 set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
 set binPath=java -DworkingDir...

 CONSOLE SECTION
 set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
 java -DworkingDir=%~dp0..

 Perhaps it would be easier to have one location to store this value, to make 
 it easier to use absolute paths for java. We use absolute paths due to Azure 
 VM's.

 e.g.
 $Java_Path  
 =e:\AzureTemp\s0\deployment(337)\res\deployment(337).Neo4j.Azure.Server.Neo4jServerHost.0\directory\Neo4jInst\jre6\bin\java.exe
  

 And then
 set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
 set binPath=$Java_Path -DworkingDir...

 CONSOLE SECTION
 set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
 $Java_Path  -DworkingDir=%~dp0..

 We use auto configuration in the cloud, so we always customize the configs on 
 the fly when vm's spin up. Easier way to search and replace strings would be 
 much appreciated. This will make it much easier for us to customize the 
 config on the fly by just replacing $Java_Path.

 e.g. after boot strap in the cloud.
 :install
 set 
 classpath=-DserverClasspath=lib/*.jar;system/lib/*.jar;plugins/*.jar;system/coordinator/lib/*.jar
 set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
 set 
 binPath=e:\AzureTemp\s0\deployment(337)\res\deployment(337).Neo4j.Azure.Server.Neo4jServerHost.0\directory\Neo4jInst\jre6\bin\java.exe
  -DworkingDir=%~dps0.. -DconfigFile=conf\neo4j-wrapper.conf %classpath% 
 %mainclass% -jar %~dps0windows-service-wrapper-1.jar %serviceName%
 and
 :console
 set 
 classpath=-DserverClasspath=lib/*.jar;system/lib/*.jar;plugins/*.jar;system/coordinator/lib/*.jar
 set mainclass=-DserverMainClass=org.neo4j.server.Bootstrapper
 e:\AzureTemp\s0\deployment(337)\res\deployment(337).Neo4j.Azure.Server.Neo4jServerHost.0\directory\Neo4jInst\jre6\bin\java.exe
  -DworkingDir=%~dp0.. -DconfigFile=conf\neo4j-wrapper.conf %classpath% 
 %mainclass% -jar %~dp0windows-service-wrapper-1.jar



 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


Re: [Neo4j] Neo4J Gremlin Query for dates

2011-07-29 Thread Romiko Derbynew
Thanks Marko,

Indeed, thanks for the tips, I now have a an idea how to do the conversion from 
c# to java. Indeed, I use the iterator most of the time, will refrain from the 
index notation in the future :)

 If you interested, I have written a short blog post about the c# client that 
we have built and are using at:

http://romikoderbynew.wordpress.com/2011/07/30/neo4jclient-primer/\

Hopefully we will get date lambda expressions working in the client soon :)

Cheers

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko Rodriguez
Sent: Saturday, 30 July 2011 1:19 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Neo4J Gremlin Query for dates

Hi,

 I have dates in Neo4j stored as JSON Dates.
 
 e.g.
 DateCreated: /Date(1310360656147+)/
 
 LastLogin: /Date(1311927251851+)/
 
 I use the iterator and lambda way of query data
 
 e.g.
 g.v(0).outE[[label:'HOSTS']].inV{it.'Name'.compareTo('Agency1') == 0}.Name


SIDENOTE: g.v(0).out('HOSTS'){  } is a more concise and speedier 
representation.


 However I want to compare dates, what is the format we can use for this? 
 Currently we have written a .Net client to consume Neo4J and I we have a 
 formatter in the client api that converts c# lambda's to java lambda's, so it 
 would be nice to know the best way to do date comparisons :)
 
 e.g.
 g.v(0).outE[[label:'HOSTS']].inV{it.'LastLogin'.dateCompareTo('/Date(1311927251851+)/')
  == 0}.Name

Huh. I would use Java/Groovy Date object. ? ...

http://www.cafeaulait.org/course/week4/68.html

DateFormat formatter = new SimpleDateFormat(MMdd);
Date rootDate = formatter.parse(dateString);

Thus, something like:

g.v(0).out('HOSTS'){formatter.parse(it.LastLogin).after(rootDate)}.Name

HTH,
Marko.

http://markorodriguez.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


Re: [Neo4j] performance relationships

2011-07-13 Thread Romiko Derbynew
Thank you :)

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Niels Hoogeveen
Sent: Wednesday, 13 July 2011 8:46 PM
To: user@lists.neo4j.org
Subject: Re: [Neo4j] performance relationships


There will indeed be a performance impact in your scenario. The relationship 
store doesn't order the relationships, so all relationships attached to Node 
(A) will be read.
Maybe indexed relationships is an option for you, see: 
https://github.com/peterneubauer/graph-collections/wiki/Indexed-relationships
Niels

 From: romiko.derby...@readify.net
 To: user@lists.neo4j.org
 Date: Tue, 12 Jul 2011 22:33:05 -0700
 Subject: [Neo4j] performance relationships
 
 Hi,
 
 If I have a Node (A) with over 5 relationships outgoing - 
 RelationshipTypeA If I have the same Node (A) with 100 relationships 
 outgoing - RelationshipTypeB
 
 Will there be a performance impact for queries travsersing RelationshipTypeB 
 because there are over 5 relationships irrespective on relationship types 
 or does Neo4J optimise the traversing by filtering/indexing the relationships.
 
 I would like to know for which specific scenarios to use a category node to 
 group data that will be large over time.
 
 Regards
 ___
 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] performance relationships

2011-07-12 Thread Romiko Derbynew
Hi,

If I have a Node (A) with over 5 relationships outgoing - RelationshipTypeA
If I have the same Node (A) with 100 relationships outgoing - RelationshipTypeB

Will there be a performance impact for queries travsersing RelationshipTypeB 
because there are over 5 relationships irrespective on relationship types 
or does Neo4J optimise the traversing by filtering/indexing the relationships.

I would like to know for which specific scenarios to use a category node to 
group data that will be large over time.

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


Re: [Neo4j] Category Nodes and Type Safety vs Performance and Scaling

2011-06-20 Thread Romiko Derbynew
Hi Guys,

Small error.

IEnumerableUser list = 
g.v(0).outE[[label:'HOSTS_COMPANY']].inV[[Key:'MyCompanyName']].


From: Romiko Derbynew
Sent: Monday, 20 June 2011 3:56 PM
To: Neo4j user discussions
Cc: Tatham Oddie; Jamal Abreu (jab...@barnardos.org.au)
Subject: Category Nodes and Type Safety vs Performance and Scaling


Hi Guys,



We currently thinking of how we can get type safety when we do queries, one 
thing we do is have a category nodes, so e.g.

Here is a sample query



IEnumerableUser list = 
g.v(0).outE[[label:'HOSTS']].inV[[Key:'MyCompanyName']].inE[[label:'IS_COMPANY']].inV



So the part highlighted in bold leverages the category.



However, we could also remove the category node (Agencies) and then just have 
more explicit relationships e.g.

IEnumerableUser list = 
g.v(0).outE[[label:'HOSTS_AGENCY']].inV[[Key:'MyCompanyName']].





Notice, here we now have a relationship where from the name we can see that the 
types coming back will always be an Agency. This means relationship names have 
information about it's target Node type, making the amount of relationships 
proportional to the number of node types.



What are the advantages/disadvantages of both approaches, which achieve the 
same result?



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


Re: [Neo4j] Category Nodes and Type Safety vs Performance and Scaling

2011-06-20 Thread Romiko Derbynew
Hi Marko,

Thank you very much for the tips, indeed, we will follow this route as well to 
guarantee type safety without causing a negative impact on performance.

Romiko

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Marko Rodriguez
Sent: Monday, 20 June 2011 11:54 PM
To: Neo4j user discussions
Cc: Jamal Abreu (jab...@barnardos.org.au); Tatham Oddie
Subject: Re: [Neo4j] Category Nodes and Type Safety vs Performance and Scaling

Hi,

 Notice, here we now have a relationship where from the name we can see that 
 the types coming back will always be an Agency. This means relationship names 
 have information about it's target Node type, making the amount of 
 relationships proportional to the number of node types.

I tend to do the same thing when I don't want to deal with filtering when I get 
to the end of a traversal. For example:

marko---followsPerson--peter
marko---followsFeed--horicky

In the above, I don't have:

marko---follows--peter
marko---follows--horicky

because, then when I traverse, I don't have to do this:

marko.out('follows')[[type:'Feed']]

Instead, I can be safe knowing that

marko.out('followsFeed')

will always get me to feeds and thus, no filter needed.

Also, the latter plays well with Frames (http://frames.tinkerpop.com) which is 
what I use for graph-object mapping.

Hope that helps,
Marko.

http://markorodriguez.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] Category Nodes and Type Safety vs Performance and Scaling

2011-06-19 Thread Romiko Derbynew
Hi Guys,



We currently thinking of how we can get type safety when we do queries, one 
thing we do is have a category nodes, so e.g.

Here is a sample query



IEnumerableUser list = 
g.v(0).outE[[label:'HOSTS']].inV[[Key:'MyCompanyName']].inE[[label:'IS_COMPANY']].inV



So the part highlighted in bold leverages the category.



However, we could also remove the category node (Agencies) and then just have 
more explicit relationships e.g.

IEnumerableUser list = 
g.v(0).outE[[label:'HOSTS_AGENCY']].inV[[Key:'MyCompanyName']].





Notice, here we now have a relationship where from the name we can see that the 
types coming back will always be an Agency. This means relationship names have 
information about it's target Node type, making the amount of relationships 
proportional to the number of node types.



What are the advantages/disadvantages of both approaches, which achieve the 
same result?



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


Re: [Neo4j] Query Number of Nodes with Property Filter

2011-06-14 Thread Romiko Derbynew
Thank you for the response. Indeed for now we doing this, and perhaps will take 
the advice to have category nodes.

var gremlinQuery = @g.V.outE[[label:'HOSTS']].inV[['Key':'ACME']];

Again, much appreciated for the tips.
Romiko

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Michael Hunger
Sent: Wednesday, 15 June 2011 1:42 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Query Number of Nodes with Property Filter

you can use category nodes to connect nodes of a certain type to.

then you can count the nodes using a traversal

you dont have to go via an index to do things like that


Sent from my iBrick4


Am 14.06.2011 um 17:10 schrieb Marko Rodriguez okramma...@gmail.com:

 Hi,
 
 Is it possible that when we create the Automatic Index, that we can filter 
 it on specific nodes?
 
 No.
 
 Referring to the diagram below, we have a Node with a property _Type= 
 Agency. I would like to create an index (aidx-agency-key) based on Key but 
 only for the Nodes with _Type=Agency.
 So, pseudo code would be:
 g.createAutomaticIndex('myIndex', Vertex.class, new pair[,] 
 {Node._Type=Agency},“Key”)
 
 Is this the right approach, or are we doing something wrong
 
 You can't do that with AutomaticIndices.
 
 The solution we want is to be able to count all the Nodes in the database 
 with a property _Type=Agency and property Key=”myKey” or to checking the 
 existence of a Node  with _Type=”Agency” and Key=”myKey”.
 
 Yea. The not so efficient way to do that is:
 
 g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
 
 1. get agencies
 2. iterate and filter out those whose key doesn't equal 'myKey'
 3. count up what gets emitted from the pipeline.
 
 Perhaps Neo4j guys can help as there are some things with Lucene indices and 
 the 'AND' clause. Given that AutomaticIndex, when used with Neo4jGraph, is 
 just a wrapper to Lucene, I believe you can do stuff like '_Type AND 
 Key=myKey' ? -- I've never done it so I don't know... Rick, on this list, 
 knows the ins and outs of indices 
 
 
 and to do a count or check if it exists would be multiple filters 
 g.V[[_Typey:Agency],[ Name:Acme]].count()
 
 Yea, thats a bit excessive -- too many things to iterate through. You can do 
 the previous:
g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
 
 
 
 Good luck,
 Marko.
 
 http://markorodriguez.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] Query Number of Nodes with Property Filter

2011-06-13 Thread Romiko Derbynew
Hi,

I would like to write a Gremlin Query via the Gremlin Rest plugin to count the 
number of Nodes with a certain property.

Some pseudo code:
g.aidx-agency-key('key','agency').count()

So, my questions are.
How do I create the automatic index initially through the gremlin rest plugin 
or rest api directly?
and what would the gremlin query look like once the index is indeed created?

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


Re: [Neo4j] User Digest, Vol 51, Issue 57

2011-06-11 Thread Romiko Derbynew
Thanks for the help on gremlin plugin, will start a series of blogs, first one 
is up:

http://romikoderbynew.wordpress.com/2011/06/11/neo4j-and-gremlin-plugin-install-guide/

Cheers


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of user-requ...@lists.neo4j.org
Sent: Saturday, 11 June 2011 5:21 AM
To: user@lists.neo4j.org
Subject: User Digest, Vol 51, Issue 57

Send User mailing list submissions to
user@lists.neo4j.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.neo4j.org/mailman/listinfo/user
or, via email, send a message with subject or body 'help' to
user-requ...@lists.neo4j.org

You can reach the person managing the list at
user-ow...@lists.neo4j.org

When replying, please edit your Subject line so it is more specific than Re: 
Contents of User digest...


Today's Topics:

   1.  Does direction matter? (Aseem Kishore)
   2. Re:  Does direction matter? (McKinley)
   3. Re:  Does direction matter? (Aseem Kishore)
   4. Re:  Building neo4jpy for JCC in windows (oguerrer)
   5. Re:  unique indexes (yougotroo...@gmail.com)
   6. Re:  unique indexes (Rick Bullotta)
   7. Re:  unique indexes (yougotroo...@gmail.com)


--

Message: 1
Date: Fri, 10 Jun 2011 11:06:18 -0700
From: Aseem Kishore aseem.kish...@gmail.com
Subject: [Neo4j] Does direction matter?
To: Neo4j user discussions user@lists.neo4j.org
Message-ID: BANLkTi=d9dy2swnkd0kr04jwc4kvtwm...@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1

If I have a relationship from node A to node B, does the direction I make the 
relationship matter?

It doesn't seem to affect *what* I can do (e.g. regardless of the direction, I 
can retrieve that relationship from both A and B in queries, and I can retrieve 
both A and B from each other in a traversal).

But does it affect *how* the stuff I can do happens? E.g. does it affect perf? 
If the direction is from A to B, are discoveries/fetches of B from A faster 
than of A from B?

Thanks!

Aseem


--

Message: 2
Date: Fri, 10 Jun 2011 11:32:35 -0700
From: McKinley mckinley1...@gmail.com
Subject: Re: [Neo4j] Does direction matter?
To: Neo4j user discussions user@lists.neo4j.org
Message-ID: BANLkTikm602=ymyer21caxurdevb8l9...@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1

Aseem,

Even though all relationships have a direction they are equally well traversed 
in both directions so there's no need to create duplicate relationships in the 
opposite direction (with regard to traversal or performance).
http://api.neo4j.org/current/org/neo4j/graphdb/Relationship.html

Use relationship direction to express the model and meaning. Performance will 
be the same. Obviously, creating extra bidirectional relationships could have 
some meaning in your model and if so, you should document it.
When it does not provide meaning, extra relationships can only get in the way 
and cause confusion and perhaps hurt performance.

Cheers,

McKinley

On Fri, Jun 10, 2011 at 11:06 AM, Aseem Kishore aseem.kish...@gmail.comwrote:

 But does it affect *how* the stuff I can do happens? E.g. does it
 affect perf? If the direction is from A to B, are discoveries/fetches
 of B from A faster than of A from B?

 Thanks!

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



--

Message: 3
Date: Fri, 10 Jun 2011 11:37:47 -0700
From: Aseem Kishore aseem.kish...@gmail.com
Subject: Re: [Neo4j] Does direction matter?
To: Neo4j user discussions user@lists.neo4j.org
Message-ID: banlktimbwmeohh-iv7bv8apbicbtp4c...@mail.gmail.com
Content-Type: text/plain; charset=ISO-8859-1

Thanks McKinley!

For what it's worth, we use Neo4j only via the REST API, so I tend not to look 
at the Javadocs. It would be great to move some of this sort of documentation 
into a general Neo4j documentation area, since one would think to go to the 
Javadocs mainly only if they were using the Java API.

Cheers,
Aseem

On Fri, Jun 10, 2011 at 11:32 AM, McKinley mckinley1...@gmail.com wrote:

 Aseem,

 Even though all relationships have a direction they are equally well
 traversed in both directions so there's no need to create duplicate
 relationships in the opposite direction (with regard to traversal or
 performance).
 http://api.neo4j.org/current/org/neo4j/graphdb/Relationship.html

 Use relationship direction to express the model and meaning.
 Performance will be the same. Obviously, creating extra bidirectional
 relationships could have some meaning in your model and if so, you should 
 document it.
 When it does not provide meaning, extra relationships can only get in
 the way and cause confusion and perhaps hurt performance.

 Cheers,

 McKinley

 On Fri, Jun 10, 2011 at 11:06 AM, Aseem Kishore
 aseem.kish...@gmail.com
 

[Neo4j] Gremlin

2011-06-09 Thread Romiko Derbynew
Hi,

I am currently using the latest version of Neo4J. However, when I run:
curl -v http://localhost:7474/db/data/

I get this response for extensions:
extensions : {
}

And when I look in System\Lib, I can see gremlin-0.9.jar.

So, how do I register or configure the server to enable gremlin. Since, when I 
try to query it via:

http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script+





I get no such plugin exists (I also tried to copy the jar file to the plugin 
folder, and some little voice told me this is not the right way, since it is in 
the system folder already :))



Any help is appreciate, I am looking at creating a .Net Query Language for it 
at some point.





No such ServerPlugin: GremlinPlugin

org.neo4j.server.plugins.PluginLookupException: No such ServerPlugin: 
GremlinPlugin

at 
org.neo4j.server.plugins.PluginManager.extension(PluginManager.java:108)

at 
org.neo4j.server.plugins.PluginManager.describe(PluginManager.java:117)

at 
org.neo4j.server.rest.web.ExtensionService.describeGraphDatabaseExtension(ExtensionService.java:287)

at 
org.neo4j.server.rest.web.ExtensionService.getGraphDatabaseExtensionDescription(ExtensionService.java:150)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)



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