[Neo4j] Cypher: combining results?

2011-11-06 Thread D. Frej
Hi,

Cypher allows to define multiple starting points. Example:
start n=(1, 2, 3) return n (taken from 
http://docs.neo4j.org/chunked/stable/query-start.html#start-multiple-nodes-by-id)

Can this only be done in the START clause or also in the MATCH clause, 
like this?

START principal=node:nodes(NAME='User 3')
MATCH (principal)-[:IS_MEMBER_OF*0..1]-()-[:IS_MEMBER_OF*0..]-(n), (n, 
principal)-[secRel:SECURITY]-(d)
RETURN d

When I do it as mentioned, I get the following Exception which does not 
make any sense to me:

Exception in thread main org.neo4j.cypher.SyntaxException: Matching 
nodes without identifiers have to have parenthesis: ()

What did I do wrong?

Thanks,

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


Re: [Neo4j] Cypher: combining results?

2011-11-06 Thread Andres Taylor
On Nov 6, 2011 10:55 AM, D. Frej dieter_f...@gmx.net wrote:

 Hi,

 Cypher allows to define multiple starting points. Example:
 start n=(1, 2, 3) return n (taken from

http://docs.neo4j.org/chunked/stable/query-start.html#start-multiple-nodes-by-id
)

 Can this only be done in the START clause or also in the MATCH clause,
 like this?

 START principal=node:nodes(NAME='User 3')
 MATCH (principal)-[:IS_MEMBER_OF*0..1]-()-[:IS_MEMBER_OF*0..]-(n), (n,
 principal)-[secRel:SECURITY]-(d)
 RETURN d

The problem is the last part of the match, where you have (n,principal).
What is it that you are trying to express with that?

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


Re: [Neo4j] Cypher: combining results?

2011-11-06 Thread Andres Taylor
On Sun, Nov 6, 2011 at 12:25 PM, Andres Taylor 
andres.tay...@neotechnology.com wrote:


 On Nov 6, 2011 10:55 AM, D. Frej dieter_f...@gmx.net wrote:
 
  Hi,
 
  Cypher allows to define multiple starting points. Example:
  start n=(1, 2, 3) return n (taken from
 
 http://docs.neo4j.org/chunked/stable/query-start.html#start-multiple-nodes-by-id
 )
 
  Can this only be done in the START clause or also in the MATCH clause,
  like this?
 
  START principal=node:nodes(NAME='User 3')
  MATCH (principal)-[:IS_MEMBER_OF*0..1]-()-[:IS_MEMBER_OF*0..]-(n), (n,
  principal)-[secRel:SECURITY]-(d)
  RETURN d

 The problem is the last part of the match, where you have (n,principal).
 What is it that you are trying to express with that?


Well, to be truthful about it - the stupid exception is also a problem.
It's been nagging me for some time, Cypher's syntax checking is not what I
would like it to be. Sorry about that...

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


Re: [Neo4j] Cypher: combining results?

2011-11-06 Thread D. Frej
I have a very simply graph:

UserGroup 2 -[:IS_MEMBER_OF]- UserGroup 1, User 3
UserGroup 1 -[:IS_MEMBER_OF]- User 1, User 2

And I am trying to get all nodes that are on the same level and below 
the starting point including the starting point. This works for, e.g. 
User 3, but not for UserGroup2. The cypher is used is the one presented.

Since I cannot get the starting point included, I tried to do this 
combining thing for the further matching.



Am 06.11.2011 12:25, schrieb Andres Taylor:
 On Nov 6, 2011 10:55 AM, D. Frejdieter_f...@gmx.net  wrote:
 Hi,

 Cypher allows to define multiple starting points. Example:
 start n=(1, 2, 3) return n (taken from

 http://docs.neo4j.org/chunked/stable/query-start.html#start-multiple-nodes-by-id
 )
 Can this only be done in the START clause or also in the MATCH clause,
 like this?

 START principal=node:nodes(NAME='User 3')
 MATCH (principal)-[:IS_MEMBER_OF*0..1]-()-[:IS_MEMBER_OF*0..]-(n), (n,
 principal)-[secRel:SECURITY]-(d)
 RETURN d
 The problem is the last part of the match, where you have (n,principal).
 What is it that you are trying to express with that?

 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


Re: [Neo4j] Cypher: combining results?

2011-11-06 Thread D. Frej
Andrés, is there an official grammar for e.g. antlr or JavaCC for cypher 
syntax?



Am 06.11.2011 15:11, schrieb Andres Taylor:
 On Sun, Nov 6, 2011 at 12:25 PM, Andres Taylor
 andres.tay...@neotechnology.com  wrote:

 On Nov 6, 2011 10:55 AM, D. Frejdieter_f...@gmx.net  wrote:
 Hi,

 Cypher allows to define multiple starting points. Example:
 start n=(1, 2, 3) return n (taken from

 http://docs.neo4j.org/chunked/stable/query-start.html#start-multiple-nodes-by-id
 )
 Can this only be done in the START clause or also in the MATCH clause,
 like this?

 START principal=node:nodes(NAME='User 3')
 MATCH (principal)-[:IS_MEMBER_OF*0..1]-()-[:IS_MEMBER_OF*0..]-(n), (n,
 principal)-[secRel:SECURITY]-(d)
 RETURN d
 The problem is the last part of the match, where you have (n,principal).
 What is it that you are trying to express with that?

 Well, to be truthful about it - the stupid exception is also a problem.
 It's been nagging me for some time, Cypher's syntax checking is not what I
 would like it to be. Sorry about that...

 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


Re: [Neo4j] REST api get list of all relationship properties (unique)

2011-11-06 Thread Jure Zakotnik
Hi Peter,

sounds good, I'll check how to contribute..

Meanwhile I was working on the original question of the thread - getting a
list of unique properties used in the relationships. Since the lucene
indexer in neo4j always uses nodes or relationships, I don't see a way to
extract a list of relationship poperties, without retrieving all
relationships as well (e.g. 1M relationships with 5 different properties),
which could result in bad performance. Did I overlook something?
The other option would be a separate key-value-store or lucene index, but I
would like to keep only neo4j as persistence..

The use-case is an UI to create a relationship with auto-complete on
existing properties.

Regards, Jure

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/REST-api-get-list-of-all-relationship-properties-unique-tp3458852p3484986.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] Property loading in Neo4J 1.4

2011-11-06 Thread Rick Bullotta
If a node is accessed, are *all* of its properties loaded into memory?

Thanks,

Rick

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


Re: [Neo4j] SDG 2.0.0.M1 cross-store does not work properly

2011-11-06 Thread Marcin Zasepa
Hi Michael,
thanks a lot for you fast response. I run the tests against SNAPSHOT and it
works. I had also problems with mapping of enums and it works either now.
Great job! thanks a lot.

BTW: Could you point any docs or examples how to use alternative non-aspectj
mapping approach, maybe this approach will hell solve the problem with
serializing of domain object. Currently invoking persist() on deserialized
object causes NPE, which is pretty problematic when working with wicket.

Thanks a lot in advance
Greets, Marcin

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/SDG-2-0-0-M1-cross-store-does-not-work-properly-tp3481372p3485361.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] Neo4j performance with 400million nodes

2011-11-06 Thread Anders Nawroth
Hi alican,

I just want to report back that I was able to reproduce the problem and 
narrow down the cause a bit. Seems the UI and DB threads are waiting for 
each other ... haven't got around to fix it though.

/anders

2011-11-02 07:08, algecya skrev:
 Hi anders,
 appreciate your offer very much! It is good to know that the neo4j community
 is very active and involved.

 http://neo4j-community-discussions.438527.n3.nabble.com/file/n3472966/BatchImportData.groovy
 BatchImportData.groovy

 Here is the import script. it is a stripped version of the graph I used for
 testing. If you need more data, just increase the variable 'amountTypeA' at
 line 26.

 --
 alican


 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-performance-with-400million-nodes-tp3467806p3472966.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] SDG 2.0.0.M1 cross-store does not work properly

2011-11-06 Thread Michael Hunger
There is are two examples in the current snapshot, hello-worlds and cineasts 
(w/o -*)

Could you share the use-case + NPE that you've described?

Thanks a lot

Michael

mh$ ls -1 spring-data-neo4j-examples/
cineasts [x]
cineasts-aspects
cineasts-rest
hello-worlds  [x]
hello-worlds-aspects
imdb
myrestaurants-original
myrestaurants-social

Am 06.11.2011 um 22:33 schrieb Marcin Zasepa:

 Hi Michael,
 thanks a lot for you fast response. I run the tests against SNAPSHOT and it
 works. I had also problems with mapping of enums and it works either now.
 Great job! thanks a lot.
 
 BTW: Could you point any docs or examples how to use alternative non-aspectj
 mapping approach, maybe this approach will hell solve the problem with
 serializing of domain object. Currently invoking persist() on deserialized
 object causes NPE, which is pretty problematic when working with wicket.
 
 Thanks a lot in advance
 Greets, Marcin
 
 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/SDG-2-0-0-M1-cross-store-does-not-work-properly-tp3481372p3485361.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] Gremlin - how to flatten a tree, and sort

2011-11-06 Thread Tatham Oddie
Marko,

 And I'm saying nasty with a South African accent so you know its dirty.

Thanks to working with Romiko, I'm getting an eerily clear mental image of that.


-- Tatham

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


Re: [Neo4j] Neo4j performance with 400million nodes

2011-11-06 Thread algecya
anders, thank you very much for reporting back and looking at it!
Good luck fixing the bug then 
--
alican

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-performance-with-400million-nodes-tp3467806p3486237.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