23 May 2012, 07:07
Generic-user-small

Claus Guttesen (3 posts)

Hi.

I’m trying to perform the following script (copied from the web):

Gremlin.defineStep( 'friendsuggest', [Vertex, Pipe], { _().sideEffect{start = it}.both('friends').except([start]).out('likes').dedup } )

g.V.filter{it.name==’Patty’}.friendsuggest.name

I get the error:

No such property: start for class: groovysh_evaluate

This is on neo4j 1.7 com.ed. on os x ML and chrome browser. I tried the same script on ubuntu but got the same error.

Am I missing some obvious? :-)

regards Claus

13 Jun 2012, 18:37
Avatar_pragsmall

Jim R. Wilson (43 posts)

Instead of @except([start])@, does it work if you use @filter{x != it}@?

That seems to be the method they use here: https://github.com/tinkerpop/gremlin/wiki/User-Defined-Steps

20 Jun 2012, 12:07
Generic-user-small

Claus Guttesen (3 posts)

Aah, yes. :-) Thank you.

regards Claus

12 Sep 2012, 18:30
Generic-user-small

Mick Brooks (6 posts)

I see the same error. After a bit of a play I think it’s related to variable scoping rules in Groovy. I wrote a simple patch that fixes it for me here: https://github.com/sevenweeks/databases/pull/1

Can any Groovy expert confirm my diagnosis?

  You must be logged in to comment