Hi Darrick (and other pacer experts),
my question is quite related to Steven's Thread on "multiple roots for query":
I want to be able to have an array of values like ["Alice","Bob"] and get all the nodes where an (indexed) property (like :name) has one of these values.
For a single value it is just g.v(:name=>"Alice"). A "V-Index" Pipe-Thingy is assembled and everything is working smoothly.
My naive syntax guess on g.v(:name=>["Alice","Bob"]) does (understandably) not work and reports:
"Value [[Ljava.lang.Object;@1234567ab] is not an instance of the expected data type for property key [name]. Expected: class java.lang.String, found: class [Ljava.lang.Object;"
Finally another approach
g.v([{:name=>"Alice"},{:name=>"Bob"}])
throws no error but does something completely different (and in this case useless, by the way...): V-Index(name: "Alice") -> V-Property(name=="Bob")
As far as I dug into Pipes I do not see any possibility to have nodes selected from an index by more than one target value. Is that true?
Well, one workaround to get all the matched nodes from the index into one route could be something like this:
["Alice","Bob"].map{|n| g.v({:name=>n}).element_ids.to_a}.flatten.id_to_element_route(based_on: g.v)
But this roundtrip over map and the ids feels kind of wrong. And the debug info for the new route "Obj 2 ids -> lookup -> is_not(nil)" is also not as useful anymore.
Is there any better way to achieve what I want? Have I overlooked something?
Thanks alot for your support!