g.V().has('TEXT_key_prop', textContainsRegex('The.*')) // startsWithg.V().has('TEXT_key_prop', textContainsRegex('.*dog')) // endsWith
--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/38e91396-e711-4196-a408-053e9dc49ace%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Guy,I believe ^ and $ are always added by Titan. This should work for you:g.V().has('TEXT_key_prop', textContainsRegex('The.*')) // startsWithg.V().has('TEXT_key_prop', textContainsRegex('.*dog')) // endsWithCheers,Daniel
On Wed, Feb 15, 2017 at 7:44 PM, Guy Ellis <wildf...@gmail.com> wrote:
I'm trying to work out how to get the following to work:
g.V().has(<prop-name>, startsWith/endsWith(<some-text>))
So if I have:
graph.addVertex('myname', 'The quick brown fox JUMPS oVeR the lazy dog');
I would expect these to match:
g.V().has('TEXT_key_prop', textContainsRegex('^The quick'))
g.V().has('TEXT_key_prop', textContainsRegex('^The'))
I'm using Titan with Elasticsearch.
Because of all the combinations of indexes and ways to query this I created a script that
generated a bunch of groovy that is in this gist to test as many permutations of the query
as possible and I'm unable to find any that will match the startsWith or endsWith.
--
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 unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/b26f0003-edc1-4656-bef2-7d1acee96867%40googlegroups.com.