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

Function tokenizeValue

worker/stringfilter.go:92–103  ·  view source on GitHub ↗
(value types.Val, filter *stringFilter)

Source from the content-addressed store, hash-verified

90}
91
92func tokenizeValue(value types.Val, filter *stringFilter) []string {
93 tokenizer, found := tok.GetTokenizer(filter.tokName)
94 // tokenizer was used in previous stages of query processing, it has to be available
95 x.AssertTrue(found)
96
97 tokens, err := tok.BuildTokens(value.Value, tok.GetTokenizerForLang(tokenizer, filter.lang))
98 if err != nil {
99 glog.Errorf("Error while building tokens: %s", err)
100 return []string{}
101 }
102 return tokens
103}

Callers 1

defaultMatchFunction · 0.85

Calls 5

GetTokenizerFunction · 0.92
AssertTrueFunction · 0.92
BuildTokensFunction · 0.92
GetTokenizerForLangFunction · 0.92
ErrorfMethod · 0.45

Tested by

no test coverage detected