What is the equivalent of allofterms for a trigram search?

I am trying to build an intuitive search interface for my app. I want wildcards so I need to use trigram, but I also want the ability to do an AND search of multiple terms. I could do it in regex if lookarounds were supported but they are not. I can do ORs easily with | operator in regex but AND functionality seems not possible or perhaps I am missing something.

You might have to put it in a filter directive and combine them using logic there. That would be the most equivalent to what you are looking for.

P.S. forewarning, using the trigram heavily will lead to slower queries. I would put logic in place in the app so that only use regex if there were wildcards present in any one variable instead of defaulting to trigram.

1 Like

Ahh that makes sense, thanks!

Is it possible to setup a custom tokenizer in Dgraph Cloud?

Not right now.