[Neo4j] Server log file for HA

2011-10-28 Thread Brendan cheng

Hi,
I could not find any log message for unmanaged extension when a 500 error 
respond generated in HA configuration.Does neo4j rest server generate any 
message for unmanaged extension?
I was trying to use JAXB for JSON respond of an object but get the 500 error 
respond.  But I can successfully get a XML respond.Any idea?
Regards,
Brendan   
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST traverse deprecation

2011-10-28 Thread Peter Neubauer
Thank you Max! The AREL for Cypher sounds very interesting!

Do you think the traversal rest api us doing its job for you given the power
of hhe häva version? I can even think if having a query method on the
embedded api so it fits...
On Oct 29, 2011 12:19 AM, "maxdemarzi"  wrote:

> This change will kill "phase 2" (the part that tries to mimic the Neo4j.rb
> API) of Neography since I use it to provide idiomatic access to neo4j.
>
> For example:
> def suggestions_for(node)
>  node.incoming(:friends).order("breadth first").uniqueness("node
> global").filter("position.length() == 2;").depth(2)
> end
>
> The options are:
> 1. Have users enter cypher directly ex. node.cypher("some cypher query
> here")
> 2. Create an AREL for Cypher.  ( https://github.com/rails/arel )If it's
> the
> right thing for Neo4j then do what you have to do.
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-REST-traverse-deprecation-tp3460396p3462201.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST traverse deprecation

2011-10-28 Thread maxdemarzi
This change will kill "phase 2" (the part that tries to mimic the Neo4j.rb
API) of Neography since I use it to provide idiomatic access to neo4j.

For example:
def suggestions_for(node)  
  node.incoming(:friends).order("breadth first").uniqueness("node
global").filter("position.length() == 2;").depth(2)
end

The options are:
1. Have users enter cypher directly ex. node.cypher("some cypher query
here")
2. Create an AREL for Cypher.  ( https://github.com/rails/arel )If it's the
right thing for Neo4j then do what you have to do.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-REST-traverse-deprecation-tp3460396p3462201.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] some questions

2011-10-28 Thread Peter Neubauer
Mmh,
I think Jake is best to answer 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 Fri, Oct 28, 2011 at 3:30 PM, andrew ton  wrote:
>
>
> Hi Peter,
>
> I think I go to the direction of implementing a REST endpoint in Java. How 
> about my first question about customizing the Admin page?
>
> Thanks,
> Andrew
>
>
> 
> From: Peter Neubauer 
> To: Neo4j user discussions 
> Sent: Friday, October 28, 2011 8:05 AM
> Subject: Re: [Neo4j] some questions
>
> Andrew,
> that sounds like a traversal you need to do to find exactly the nodes
> you need and remove them.
>
> As Marko mentioned - either script it in Gremlin/Groovy, or implement
> a REST endpoint in Java, giving you full static powaah:
> http://docs.neo4j.org/chunked/snapshot/server-plugins.html
>
> Does that work?
>
> 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 Fri, Oct 28, 2011 at 3:02 PM, andrew ton  wrote:
>>
>>
>> Yes, that's what I have been doing :)
>>
>> However what if I have 2 graphs under a root node and I just want to remove 
>> 1 graph and leave the other alone.
>>
>> Any suggestions?
>>
>> Thanks,
>>
>>
>> 
>> From: Linan Wang 
>> To: Neo4j user discussions 
>> Sent: Friday, October 28, 2011 7:59 AM
>> Subject: Re: [Neo4j] some questions
>>
>> to clear the full db, stop the server and delete the files in data folder :)
>>
>> On Fri, Oct 28, 2011 at 3:57 PM, Marko Rodriguez  
>> wrote:
>>> Hi,
>>>
 2. Assume I have a big graph in the REST server, what is the best way to 
 remove the whole graph? Of course deleting each node and its relationships 
 and its index is not convenient.
>>>
>>>
>>> Via Gremlin Plugin, you can call g.clear().
>>>
>>> HTH,
>>> Marko.
>>>
>>> http://markorodriguez.com
>>> ___
>>> Neo4j mailing list
>>> User@lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>>>
>>
>>
>>
>> --
>> Best wishes,
>>
>> Linan Wang
>> Architect, Programmer, PhD
>> ___
>> 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] some questions

2011-10-28 Thread andrew ton


Hi Peter,

I think I go to the direction of implementing a REST endpoint in Java. How 
about my first question about customizing the Admin page? 

Thanks,
Andrew



From: Peter Neubauer 
To: Neo4j user discussions 
Sent: Friday, October 28, 2011 8:05 AM
Subject: Re: [Neo4j] some questions

Andrew,
that sounds like a traversal you need to do to find exactly the nodes
you need and remove them.

As Marko mentioned - either script it in Gremlin/Groovy, or implement
a REST endpoint in Java, giving you full static powaah:
http://docs.neo4j.org/chunked/snapshot/server-plugins.html

Does that work?

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 Fri, Oct 28, 2011 at 3:02 PM, andrew ton  wrote:
>
>
> Yes, that's what I have been doing :)
>
> However what if I have 2 graphs under a root node and I just want to remove 1 
> graph and leave the other alone.
>
> Any suggestions?
>
> Thanks,
>
>
> 
> From: Linan Wang 
> To: Neo4j user discussions 
> Sent: Friday, October 28, 2011 7:59 AM
> Subject: Re: [Neo4j] some questions
>
> to clear the full db, stop the server and delete the files in data folder :)
>
> On Fri, Oct 28, 2011 at 3:57 PM, Marko Rodriguez  wrote:
>> Hi,
>>
>>> 2. Assume I have a big graph in the REST server, what is the best way to 
>>> remove the whole graph? Of course deleting each node and its relationships 
>>> and its index is not convenient.
>>
>>
>> Via Gremlin Plugin, you can call g.clear().
>>
>> HTH,
>> Marko.
>>
>> http://markorodriguez.com
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
>
> --
> Best wishes,
>
> Linan Wang
> Architect, Programmer, PhD
> ___
> 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] some questions

2011-10-28 Thread Peter Neubauer
Andrew,
that sounds like a traversal you need to do to find exactly the nodes
you need and remove them.

As Marko mentioned - either script it in Gremlin/Groovy, or implement
a REST endpoint in Java, giving you full static powaah:
http://docs.neo4j.org/chunked/snapshot/server-plugins.html

Does that work?

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 Fri, Oct 28, 2011 at 3:02 PM, andrew ton  wrote:
>
>
> Yes, that's what I have been doing :)
>
> However what if I have 2 graphs under a root node and I just want to remove 1 
> graph and leave the other alone.
>
> Any suggestions?
>
> Thanks,
>
>
> 
> From: Linan Wang 
> To: Neo4j user discussions 
> Sent: Friday, October 28, 2011 7:59 AM
> Subject: Re: [Neo4j] some questions
>
> to clear the full db, stop the server and delete the files in data folder :)
>
> On Fri, Oct 28, 2011 at 3:57 PM, Marko Rodriguez  wrote:
>> Hi,
>>
>>> 2. Assume I have a big graph in the REST server, what is the best way to 
>>> remove the whole graph? Of course deleting each node and its relationships 
>>> and its index is not convenient.
>>
>>
>> Via Gremlin Plugin, you can call g.clear().
>>
>> HTH,
>> Marko.
>>
>> http://markorodriguez.com
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
>
> --
> Best wishes,
>
> Linan Wang
> Architect, Programmer, PhD
> ___
> 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] some questions

2011-10-28 Thread andrew ton


Yes, that's what I have been doing :)

However what if I have 2 graphs under a root node and I just want to remove 1 
graph and leave the other alone.

Any suggestions?

Thanks,



From: Linan Wang 
To: Neo4j user discussions 
Sent: Friday, October 28, 2011 7:59 AM
Subject: Re: [Neo4j] some questions

to clear the full db, stop the server and delete the files in data folder :)

On Fri, Oct 28, 2011 at 3:57 PM, Marko Rodriguez  wrote:
> Hi,
>
>> 2. Assume I have a big graph in the REST server, what is the best way to 
>> remove the whole graph? Of course deleting each node and its relationships 
>> and its index is not convenient.
>
>
> Via Gremlin Plugin, you can call g.clear().
>
> HTH,
> Marko.
>
> http://markorodriguez.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Best wishes,

Linan Wang
Architect, Programmer, PhD
___
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] some questions

2011-10-28 Thread Linan Wang
to clear the full db, stop the server and delete the files in data folder :)

On Fri, Oct 28, 2011 at 3:57 PM, Marko Rodriguez  wrote:
> Hi,
>
>> 2. Assume I have a big graph in the REST server, what is the best way to 
>> remove the whole graph? Of course deleting each node and its relationships 
>> and its index is not convenient.
>
>
> Via Gremlin Plugin, you can call g.clear().
>
> HTH,
> Marko.
>
> http://markorodriguez.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Best wishes,

Linan Wang
Architect, Programmer, PhD
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] some questions

2011-10-28 Thread Marko Rodriguez
Hi,

> 2. Assume I have a big graph in the REST server, what is the best way to 
> remove the whole graph? Of course deleting each node and its relationships 
> and its index is not convenient.


Via Gremlin Plugin, you can call g.clear().

HTH,
Marko.

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


[Neo4j] some questions

2011-10-28 Thread andrew ton


Hello,

I have 2 questions:

1. Is there any way to customize the Admin page of the Neo4J Rest server? For 
instance, I'd like to add a title of the project on the page.

2. Assume I have a big graph in the REST server, what is the best way to remove 
the whole graph? Of course deleting each node and its relationships and its 
index is not convenient.

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


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

2011-10-28 Thread KanTube
This is not an issue for me anymore - i replaced the data files that were
causing me an issue with another set of data files.  

i included the data files with the previous post.  if you are not able to
get them let me know and i will send them again. 

thanks

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/1-5M02-failed-to-start-on-reboot-tp3455296p3461154.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher column order now respected

2011-10-28 Thread Peter Neubauer
I like!
On Oct 28, 2011 2:08 PM, "Andres Taylor" 
wrote:

> A number of people have asked for it, so
> here<
> https://github.com/neo4j/community/commit/95072e34baeca97c16fc65fe021e5a2981c5305b
> >it
> is. Column ordering in the execution result is the same as appears on
> the
> return list.
>
> Andrés
> ___
> 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] Cypher column order now respected

2011-10-28 Thread Andres Taylor
A number of people have asked for it, so
hereit
is. Column ordering in the execution result is the same as appears on
the
return list.

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


Re: [Neo4j] REST traverse deprecation

2011-10-28 Thread Rick Bullotta
...but maybe offer different "install bundles".

The other danger of forcing them into the server distro is that it increases 
the likelihood of dependency conflicts.  

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Rick Bullotta
Sent: Friday, October 28, 2011 7:16 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] REST traverse deprecation

"Don't Bloat".

This also allows the plug-ins and language bindings to evolve at a difference 
pace/cycle than the server.  I'd say keep them separate.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Jim Webber
Sent: Friday, October 28, 2011 7:11 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] REST traverse deprecation

> If we do that, I propose that we move the Cypher and Gremlin plugins into
> server. WDYT?

I'm ambivalent about that. What end-user benefits are there versus shipping 
them as plugins?

Jim

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


Re: [Neo4j] REST traverse deprecation

2011-10-28 Thread Rick Bullotta
"Don't Bloat".

This also allows the plug-ins and language bindings to evolve at a difference 
pace/cycle than the server.  I'd say keep them separate.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Jim Webber
Sent: Friday, October 28, 2011 7:11 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] REST traverse deprecation

> If we do that, I propose that we move the Cypher and Gremlin plugins into
> server. WDYT?

I'm ambivalent about that. What end-user benefits are there versus shipping 
them as plugins?

Jim

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


Re: [Neo4j] REST traverse deprecation

2011-10-28 Thread Jim Webber
> If we do that, I propose that we move the Cypher and Gremlin plugins into
> server. WDYT?

I'm ambivalent about that. What end-user benefits are there versus shipping 
them as plugins?

Jim

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


[Neo4j] Cypher syntax feedback wanted

2011-10-28 Thread Andres Taylor
Hi all!

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

It looks like:

WHERE 
ALL( in  : )
etc

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

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

What do you think?

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


Re: [Neo4j] REST traverse deprecation

2011-10-28 Thread Peter Neubauer
Also,
If we do that, I propose that we move the Cypher and Gremlin plugins into
server. WDYT?
On Oct 28, 2011 12:03 PM, "Jim Webber"  wrote:

> From the high church of REST, I have no objections.
>
> "Blessed be the Roy, for he hath delivered us from RPC." Or something.
>
> Jim
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST traverse deprecation

2011-10-28 Thread Jim Webber
>From the high church of REST, I have no objections.

"Blessed be the Roy, for he hath delivered us from RPC." Or something.

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


Re: [Neo4j] REST traverse deprecation

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

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

2011/10/28 Peter Neubauer 

> Hi all,
> I think that the whole concept of
> http://docs.neo4j.org/chunked/snapshot/rest-api-traverse.html is
> broken, since it tries to emulate the embedded traversal logic in
> REST, which is just broken.
>
> With Cypher and Gremlin being MUCH better suited to do declarative and
> scripted traversals, I think it is time to deprecate this part of the
> REST API.
>
> Is anyone going to be very sad if I go ahead and do that?
>
> Cheers,
>
> /peter neubauer
>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org  - NOSQL for the Enterprise.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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


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

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

2011/10/27 KanTube 

> Chris,
>
> my servers are not in HA, i have two dev servers and one uat server all
> running the community edition with one dev server running two services at
> the same time.  the issue was on the uat server.
>
> i will send you the files you requested
>
> i deleted the data directory because i had an issue moving from 1.4 to
> 1.5.01 (completely separate from this issue) and noticed that if i deleted
> the directory a new one would be generated and the server started.  so i
> gave it a try again to see if the data files were the cause this time, no
> magic here.
>
> thanks
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/1-5M02-failed-to-start-on-reboot-tp3455296p3458588.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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


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

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

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

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

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

2011/10/27 Bruno Paiva Lima da Silva 

> Easy: just one.
>
> For now, I've written this, but I'm still not sure it is the simplest
> way to write it
>
> public boolean areConnected(Node n1,Node n2,Relationship
> rel,Direction dir) throws Exception {
> Iterable relationships = n1.getRelationships(dir);
>
> for (Relationship r : relationships) {
> //I am only working with Dynamic Relationships
> if (r.getType().equals(rel.getType())) {
> if (dir == Direction.OUTGOING) { if
> (r.getEndNode().equals(n2)) { return true; } }
> else { if (r.getStartNode().equals(n2)) { return true; } }
> }
> }
> return false;
> }
>
> Bruno
>
> Le 27/10/2011 18:31, Peter Neubauer a écrit :
> > Bruno,
> > There is no such function low level, but toy can use a Shortest path algo
> to
> > check this. What is the maximum length for a path between the nodes?
> > On Oct 27, 2011 6:14 PM, "Bruno Paiva Lima da Silva"
> > wrote:
> >
> >> Hello there!
> >> First of all, thanks for the help in all my previous questions, all the
> >> answers have been helping me to use Neo4j with success.
> >>
> >> I have a very simple question, but I haven't found the answer yet...
> >>
> >> I'd like to have a function, which signature would be more or less like
> >> this:
> >>
> >> public areTheyConnected(Node *n1*,Node *n2*,Relationship *rel*,Direction
> >> *dir*)
> >>
> >> which returns true iff there is an edge of type *rel*, between *n1* and
> >> *n2*, in the *dir* direction (the direction has n1 as reference).
> >>
> >> Example:
> >>
> >> In my graph, I have: "Bob knows Tom, Tom knows Peter, Jack knows Tom"
> >>
> >> areTheyConnected(nodeBob,nodeTom,relKnows,Direction.OUTGOING) returns
> >> true; (Bob knows Tom)
> >> areTheyConnected(nodeTom,nodeJack,relKnows,Direction.INCOMING) also
> >> returns true; (Jack knows Tom)
> >>
> >> areTheyConnected(nodeBob,nodeTom,relKnows,Direction.INCOMING) returns
> >> false; (Tom doesn't know Bob)
> >>
> >> Is there an easy method (constant time, or close) for that?
> >>
> >> Thank you very much,
> >> Bruno
> >> ___
> >> Neo4j mailing list
> >> User@lists.neo4j.org
> >> https://lists.neo4j.org/mailman/listinfo/user
> >>
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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


[Neo4j] REST traverse deprecation

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

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

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

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org              - NOSQL for the Enterprise.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Batch Inserter, Node Property error

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

2011/10/24 Christopher Schmidt 

> Send a pull request (https://github.com/neo4j/community/pull/73)
>
> On Mon, Oct 24, 2011 at 6:38 AM, Christopher Schmidt <
> fakod...@googlemail.com> wrote:
>
> > Hi all,
> >
> > I am writing a Scala wrapper for the batch insertion interfaces. While
> > doing so, I have the problem that properties are not written to DB.
> > I wrote a little test case for Java, same error. The code below prints
> out:
> >
> > 2 has property keys [2, 1]
> > 2 has property keys []
> >
> > Am I doing something wrong?
> >
> > Regards Christopher
> >
> > PS: Neo4j version 1.5-SNAPSHOT
> >
> >
> >
> > public class JavaMain {
> > public static void main(String[] args) {
> >
> > String path = "/tmp/temp-neo-batch-test";
> >
> > BatchInserter inserter = new BatchInserterImpl(path);
> > BatchInserterIndexProvider provider = new
> > LuceneBatchInserterIndexProvider(inserter);
> > String name = "users";
> > BatchInserterIndex index = provider.nodeIndex(name,
> > LuceneIndexImplementation.EXACT_CONFIG);
> >
> > GraphDatabaseService gds = inserter.getGraphDbService();
> >
> > Node myNode = gds.createNode();
> > long id = myNode.getId();
> >
> > myNode.setProperty("1", "one");
> > myNode.setProperty("2", "two");
> >
> > index.flush();
> > System.out.println(myNode.getId() + " has property keys " +
> > myNode.getPropertyKeys());
> >
> > provider.shutdown();
> > inserter.shutdown();
> >
> > GraphDatabaseService db = new EmbeddedGraphDatabase(path);
> > Node node1 = db.getNodeById(id);
> > System.out.println(node1.getId() + " has property keys " +
> > node1.getPropertyKeys());
> > db.shutdown();
> > }
> > }
> >
> > --
> > Christopher
> > twitter: @fakod
> > blog: http://blog.fakod.eu
> >
> >
>
>
> --
> Christopher
> twitter: @fakod
> blog: http://blog.fakod.eu
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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


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

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

2011/10/24 Rubicon 

> Realized, that I've to give the hole path to the node I'm looking fore...
> have:
> [refNode]USER--->[user]HAS_OCCUPATION>[occupation]
> For some reason the traverser
> Traverser usersTraverser = firstNode.traverse(Order.BREADTH_FIRST,
>StopEvaluator.END_OF_GRAPH,
> ReturnableEvaluator.ALL_BUT_START_NODE,
>RelTypes.HAS_OCCUPATION, Direction.OUTGOING);
> wouldn't find the [occupation] node. Adding additional parameters to the
> traverser (RelTypes.USER, Direction.OUTGOING), and implementing the
> ReturnableEvaluator to return
> currentPosition.lastRelationshipTraversed().isType(RelTypes.HAS_OCCUPATION)
> have done the job.
> Don't have to commit the transaction also.
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Traversing-graph-after-adding-node-tp3448023p3448255.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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


Re: [Neo4j] WebAdmin - incorrect data

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

2011/10/22 sometime 

> In the database is constantly adding / deleting relationships by REST (new
> relationships put in the index).
> Sometimes I stop the database and using the java to create / delete
> relationships  (the faster than REST) and put them in the index.
> I recently created a 600k relationships, but then I realized that they are
> wrong and removed - but the webadmin's statistics are not refreshed after
> deleting.
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/WebAdmin-incorrect-data-tp3443183p3443422.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



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


Re: [Neo4j] Primary Like ID Across Class Types

2011-10-28 Thread Ramon Buckland
Thanks Tatham,

That is helpful. I do recall now the old SQL way was also to operate in
batch selection to reduce locking.
Nice, I'll make changes this weekend.

Regards
Ramon

On Fri, Oct 28, 2011 at 1:45 AM, Tatham Oddie  wrote:

> Hi Ramon,
>
> We faced a similar problem on our current project using neo4j.
>
> Our requirements were:
>  * 64-bit integer
>  * mostly-sequential
>  * custom scopes so we could have URLs like
> /agencies/1/clients/1/addresses/1
>  * web farm friendly
>   * mostly decentralized
>   * no node-specific configuration
>  * guaranteed uniqueness
>
> Having solved all these problems, we released it as an open source library
> called SnowMaker.
>
> We are working with .NET and Azure, but you might found our approach useful
> nonetheless.
>
> I have blogged about it at http://l.tath.am/snowmaker
>
> Of most interest to you will be the explanation towards the end and the
> sequence diagrams.
>
> HTH!
>
>
> -- Tatham
>
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On Behalf Of rbuckland
> Sent: Thursday, 27 October 2011 10:37 PM
> To: user@lists.neo4j.org
> Subject: Re: [Neo4j] Primary Like ID Across Class Types
>
> I have posted the relevant code online, interested to see what people
> think.
> like - man you just over-engineered that !
>
>
> http://rbtech.blogspot.com/2011/10/neo4j-2nd-look-setting-primary-key-on.html
>
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Primary-Like-ID-Across-Class-Types-tp3457270p3457359.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user