Skip to content
Snippets Groups Projects
Commit fe3752bf authored by BlakeMScurr's avatar BlakeMScurr Committed by Manish R Jain
Browse files

Make max trigram UID flag. (#2429)

Remove trigram limit.
parent 6648f14d
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,6 @@ import (
"github.com/dgraph-io/dgraph/x"
)
const maxUidsForTrigram = 1000000
var regexTooWideErr = errors.New("Regular expression is too wide-ranging and can't be executed efficiently.")
func uidsForRegex(attr string, arg funcArgs,
......@@ -58,8 +56,6 @@ func uidsForRegex(attr string, arg funcArgs,
if results.Size() == 0 {
return results, nil
} else if results.Size() > maxUidsForTrigram {
return nil, regexTooWideErr
}
}
for _, sub := range query.Sub {
......@@ -74,8 +70,6 @@ func uidsForRegex(attr string, arg funcArgs,
}
if results.Size() == 0 {
return results, nil
} else if results.Size() > maxUidsForTrigram {
return nil, regexTooWideErr
}
}
case cindex.QOr:
......@@ -98,9 +92,6 @@ func uidsForRegex(attr string, arg funcArgs,
return nil, err
}
results = algo.MergeSorted([]*intern.List{results, subUids})
if results.Size() > maxUidsForTrigram {
return nil, regexTooWideErr
}
}
default:
return nil, regexTooWideErr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment