Reference :
http://gremlindocs.spmallette.documentup.com/#shortest-path
Trying to figure out how I could iniitalize a Collection within the Gremlin
script scope, while forming a Gremlin Pipe in Java, to optimise the
Shortest Path query
Pipe pipe;
pipe = Gremlin.compile("s = _() as
Set;_().as('x').bothE().bothV().simplePath().loop('x'){it.loops<=7 }{
!(it.object.id in
['#"+fromId+"','#"+toId+"'])}.path.filter{it.last().TYPE==\""+toType+"\" &&
it.last().OBJECTREF==\""+toObjectRef+"\"}.path[0]");
pipe.setStarts(new SingleIterator<Vertex>(fromV));
Im trying to achieve the following , which is documented in the link above
gremlin> s = [root] as Set==>v[0]
gremlin> target = '99'; c =
0;root.both().except(s).store(s).sideEffect{c++}.loop(4){it.object.id != target
&& it.loops <= 10}.has('id',target).path().iterate(); c==>100
Any help will be appreciated
--
This email is sent on behalf of Northgate Public Services (UK) Limited and
its associated companies including Rave Technologies (India) Pvt Limited
(together "Northgate Public Services") and is strictly confidential and
intended solely for the addressee(s).
If you are not the intended recipient of this email you must: (i) not
disclose, copy or distribute its contents to any other person nor use its
contents in any way or you may be acting unlawfully; (ii) contact
Northgate Public Services immediately on +44(0)1908 264500 quoting the name
of the sender and the addressee then delete it from your system.
Northgate Public Services has taken reasonable precautions to ensure that
no viruses are contained in this email, but does not accept any
responsibility once this email has been transmitted. You should scan
attachments (if any) for viruses.
Northgate Public Services (UK) Limited, registered in England and Wales
under number 00968498 with a registered address of Peoplebuilding 2,
Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2
4NN. Rave Technologies (India) Pvt Limited, registered in India under
number 117068 with a registered address of 2nd Floor, Ballard House, Adi
Marzban Marg, Ballard Estate, Mumbai, Maharashtra, India, 400001.
--
---
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.