I Have a trigram index on one of my predicates to allow me do case insensitive match using regexp. But issue is when i do regexp(TITLE, /Some Term/i)
It won’t return any results ?
If i do without “i” like this It does return results!? regexp(TITLE, /Some Term/)
Initially i faced this when i was testing via setting up dgraph via docker; but now it got even triggered suddenly on server as well after I loaded some more data.
e.g:
{
term(func: regexp(TITLE, /Nadeem N/i)) {
name: TITLE
tag
}
}
It won’t return me anything ; only after i remove /i it does
with schema
<TITLE>: string @index(exact, trigram) .
Dgraph version : v1.2.1
Dgraph SHA-256 : 3f18ff84570b2944f4d75f6f508d55d902715c7ca2310799cc2991064eb046f8
Commit SHA-1 : ddcda9296
Commit timestamp : 2020-02-06 15:31:05 -0800
Branch : HEAD
Go version : go1.13.5
Can you provide a sample? is it “Nadeem N” what? I wanna try to reproduce it.
Also, you should upgrade to a latest version, there are a lot of commits ahead.
What i find is it gets triggered while more data load on same predicate; i have one more server everything fine till now but i am sure if i try to load the new data; above issue may trigger.
And other thing is after above load; when i tried the query at first it appeared to work ; i tried same query it stopped working…
Sorry STR was one more predicate like TITLE; updated the comment.
I upgraded to latest dgraph on my test server - same issue triggered while new load.