Hello, a quick question. Let’s say i have a predicate whose values are always of form:
foo.bar.baz
What would be the most efficient index type to use if I want to be able to search for foo, bar, baz or even foo.bar and bar.baz? From my testing the term index only separates by whitespace and @ but not ., but fulltext also does not seem to index it as expected. Should this be then indexed as trigram?
Thanks!
UPDATE: Just found that term also uses - as separator. Now curious what other separators are valid.
Hi @pirxthepilot, trigram in combination with regexp queries would be worth a look-see if it meets your requirement. Regular expression queries require the “trigram” index. The tour of dgraph has an example : Regular Expressions | Search | Dgraph Tour
Regex queries in this case would look somewhat like this (looking for “bar.baz”):