Johannes, yea, i think im just going to go ahead and go with that. thank you!
On Thursday, January 2, 2014 4:26:42 PM UTC-6, Johannes Mockenhaupt wrote: > > Well, since Cypher can't test for property type, how about asking for > all nodes with the Superclass label that have the name property and then > check and update the returned nodes as necessary in the ruby script? > > On 01/02/2014 11:22 PM, Javad Karabi wrote: > > Johannes, youre absolutely right, and i agree! however, the import > > script i used did not take into account the fact that i may sometimes > > get arrays, and now my db has arrays and strings intermixed as the name > > property type. > > > > so, to rectify it, i would like to grab all nodes which have name as an > > array, grab the first element (in ruby), then set the value of the > > property to that first element. > > > > > > On Thursday, January 2, 2014 4:17:33 PM UTC-6, Johannes Mockenhaupt > wrote: > > > > I don't think having the same property be a string on some nodes and > an > > array on others is the way to go - you'll end up checking for type > all > > the time. Which is also not possible in Cypher as far as I know. Why > > not > > make it an array/collection all the time and query it like this: > > > > MATCH (n:Superclass) > > WHERE any(name IN n.name <http://n.name> WHERE name =~ > > '(?i).*SWEATERS.*') > > RETURN n > > > > On 01/02/2014 11:02 PM, Javad Karabi wrote: > > > Johannes, that seems to be exactly it. some of my nodes have a > > string, > > > some an array of strings. > > > thank you > > > > > > is it possible, then, to test on a properties type? > > > > > > > > > On Thursday, January 2, 2014 3:53:20 PM UTC-6, Johannes > > Mockenhaupt wrote: > > > > > > I can reproduce this when the property in question is an array > of > > > strings. Thus your 'name' property appears to be an array > > where you > > > expect it to be a string. > > > > > > On 01/02/2014 09:46 PM, Javad Karabi wrote: > > > > match (n:Superclass) where n.name <http://n.name> > > <http://n.name> =~ > > > "(?i).*SWEATERS.*" return n; > > > > > > > > Expected [Ljava.lang.String;@36b3041f to be a > java.lang.String, > > > but it was a [Ljava.lang.String; > > > > > > > > Neo.ClientError.Statement.InvalidType > > > > > > > > did i do something wrong in the query? > > > > > > > > -- > > > > You received this message because you are subscribed to the > > Google > > > > Groups "Neo4j" group. > > > > To unsubscribe from this group and stop receiving emails > > from it, > > > send > > > > an email to [email protected] <javascript:>. > > > > For more options, visit > > https://groups.google.com/groups/opt_out > > <https://groups.google.com/groups/opt_out> > > > <https://groups.google.com/groups/opt_out > > <https://groups.google.com/groups/opt_out>>. > > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Neo4j" group. > > > To unsubscribe from this group and stop receiving emails from it, > > send > > > an email to [email protected] <javascript:>. > > > For more options, visit https://groups.google.com/groups/opt_out > > <https://groups.google.com/groups/opt_out>. > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Neo4j" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to [email protected] <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
