REGEX match in JanusGraph


sarthak...@...
 

Hi,
I have a requirement where I need to do a REGEX match of a vertex property.

My query looks like following:

fciGraph.V().has('nodeLabel','pattern').has('context','aml').has('queryNameCheck',textContainsRegex('.*.*')).toList();


This query works fine when there is partial match present or if I do an open ended search go get all nodes but fails when there is an exact match.

Eg: 

queryNameCheck = Get 10 parties data


Input

Works: Get 10

Doesn't work: Get 10 parties data

Now I can't differentiate whether the user is sending me an exact query or not, hence, won't be able to able to modify my search from 
textContainsRegex to textContains

Why exactly 
textContainsRegex doesn't work if the match is exact?

Any help is appreciated