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

Function registerIndexFactory

tok/index_factory.go:17–24  ·  view source on GitHub ↗

registerIndexFactory(f) will register f as both a Tokenizer and specifically as an IndexFactory.

(f IndexFactory)

Source from the content-addressed store, hash-verified

15// registerIndexFactory(f) will register f as both a Tokenizer and specifically
16// as an IndexFactory.
17func registerIndexFactory(f IndexFactory) {
18 // Note: All necessary checks for duplication, etc. is done in
19 // registerTokenizers. Since we add IndexFactory instances
20 // to both tokenizers map and indexFactories map, it suffices
21 // to just check the tokenizers map for uniqueness.
22 registerTokenizer(f)
23 indexFactories[f.Name()] = f
24}
25
26// IndexFactory combines the notion of a Tokenizer with
27// index.IndexFactory. We register IndexFactory instances just

Callers 1

initFunction · 0.85

Calls 2

registerTokenizerFunction · 0.85
NameMethod · 0.65

Tested by

no test coverage detected