MCPcopy
hub / github.com/dgraph-io/dgraph / registerTokenizer

Function registerTokenizer

tok/tok.go:240–246  ·  view source on GitHub ↗
(t Tokenizer)

Source from the content-addressed store, hash-verified

238}
239
240func registerTokenizer(t Tokenizer) {
241 _, ok := tokenizers[t.Name()]
242 x.AssertTruef(!ok, "Duplicate tokenizer: %s", t.Name())
243 _, ok = types.TypeForName(t.Type())
244 x.AssertTruef(ok, "Invalid type %q for tokenizer %s", t.Type(), t.Name())
245 tokenizers[t.Name()] = t
246}
247
248// BigFloatTokenizer generates tokens from big float data.
249type BigFloatTokenizer struct{}

Callers 3

initFunction · 0.85
LoadCustomTokenizerFunction · 0.85
registerIndexFactoryFunction · 0.85

Calls 4

AssertTruefFunction · 0.92
TypeForNameFunction · 0.92
NameMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected