Hi,
I'm trying out OrientDB, and I'm trying to do a non-graphy kind of search
at this point, and query for just nodes by property parameters.
I've started with this in the Gremlin console:
g.V.or(_().has('_id', '249775'), _().has('_id', '249776'))
g.V.or(_().has('_id', '249775'), _().has('_id', '249776')).count()
It returns me those nodes, or their count respectively.
But when I want to do this in Java/Gremlin I'm running in trouble. Here's a
few steps that I'm stringing together:
OrientGraph graphDb = new OrientGraph(GRAPH_DB_PATH, "root", "root");
GremlinFluentPipeline pipeline1 = (new GremlinPipeline<Vertex,
Vertex>(getGraphDb().getEdges())).bothV();
GremlinFluentPipeline pipeline2 =
pipeline1.and(AndFilterPipe([HasNextPipe(FilterFunctionPipe),
HasNextPipe(PropertyFilterPipe(project.id,EQUAL,1))]);
(Some of the above is not literal Java, but the toString of some Java work.)
Then I do either:
while(...) pipeline2.next(1);
pipeline2.count();
Aside from that I'm getting NullPointerExceptions and also seeing some
"Cannot unlock a never acquired lock" during execution of the count, I feel
like this may all not even be the right way to go. Why am I involving edges
when all I want is nodes? Does Gremlin force me absolutely to use graph
traversals? Can I not *just* query for nodes?
Thanks for your help!
Sander.
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" 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/d/optout.