Gremlin: Performing Text Search in AWS Neptune

512 views
Skip to first unread message

Srinath Ganesh

unread,
Jul 3, 2018, 5:17:22 AM7/3/18
to Gremlin-users

Using Gremlin how can I perform Text search like,


- Name starts with "A"
- Name ends with "B"
- Name contains "t"
- etc.


I know NEO4J and Janus have some custom code for such a thing.

I figured out Neptune does not support Regex. https://forums.aws.amazon.com/thread.jspa?messageID=854392

Stephen Mallette

unread,
Jul 3, 2018, 8:47:32 AM7/3/18
to Gremlin-users
Here's my answer on SO - https://stackoverflow.com/q/51149370/1831717 - not sure there's much you can do beyond that for right now.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/7f593f5a-a18a-43a4-82b5-3cbb5570f2a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

taher chhabra

unread,
Jul 15, 2018, 10:33:27 PM7/15/18
to gremli...@googlegroups.com
You can precompute these values before storing in graph and apply equality operator while querying

Regards,
Taher


Srinath Ganesh

unread,
Jul 15, 2018, 10:34:58 PM7/15/18
to gremli...@googlegroups.com
thanks but is there a link to the documentation or an example?

You received this message because you are subscribed to a topic in the Google Groups "Gremlin-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gremlin-users/WBj2B0qKXyI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CAMKow8mvqJmMKUE6pnEX4tdM1X2ncCpbB4%3DGfs6HVeiEZYHPqw%40mail.gmail.com.

taher chhabra

unread,
Jul 17, 2018, 2:28:37 AM7/17/18
to gremli...@googlegroups.com
So in your use case, you will have to add three properties to the vertex
NameStartsWithA : bool
NameEndsWithB : bool
NameContainst : bool

While inserting the vertex, you can compute the values of the above properties and store true/false
and you gremlin query can be like
g.V().has('NameStartsWithA',true)

but again, this is not text search and can only search pre decided values

Regards,
Taher


Reply all
Reply to author
Forward
0 new messages