1
votes

I was trying to simulate the "like" search in Neptune using Gremlin. However it is not it.get() function in Neptune. The other graphs like JanusGraph has this available. Is there any alternative for this in Neptune. When we try applying the filter options on the Gremlin provided sample graphs it is working fine. However it doesn't work with Neptune. For e.g. following query works in Gremlin provided sample graph however it doesn't work in Neptune.

g.V().filter{it.get().value('name').matches(".o.")}

g.V().filter{it.get().value('name').matches(".o.")} query working with Factory provided graph in Gremlin. Neptune it was not identifying it.get()

1

1 Answers

2
votes

in your example above you are essentially sending in-line code (Groovy lambdas) to the Graph engine. It is common for hosted graph databases such as Neptune to not allow the submission of such in-line code snippets for a variety of reasons. Apache TinkerPop 3.4 takes a first step towards adding additional text searching predicates to the Gremlin language itself and avoiding the need for such lambda function usage. Once Neptune has support for Apache Tinkerpop 3.4 you will be able to do things such as startingWith, endingWith and contains searches.