Hello!
So imagine a user is searching through a sequence of nodes with a value for “name”. As they enter values into the searchbar, the list of returned results is whittled down (a very common scenario).
In MySQL I would use something like "WHERE name LIKE('%$search%')"
. This would work whether $search was “Michael”, “Mic” or completely empty.
I figured that with dGraph this could be achieved with a trigram schema, and I use the following:
AND regexp(name, /.*${search[key]}.*/i)
But if the search value is too small, like “be”, I get this error:
Regular expression is too wide-ranging and can't be executed efficiently.
Is there a way to achieve something similar to the var LIKE('%something%')
in dgraph?