MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / EncodeInvertedIndexKey

Function EncodeInvertedIndexKey

pkg/util/tsearch/encoding.go:468–472  ·  view source on GitHub ↗

EncodeInvertedIndexKey returns the inverted index key for the input lexeme.

(inKey []byte, lexeme string)

Source from the content-addressed store, hash-verified

466
467// EncodeInvertedIndexKey returns the inverted index key for the input lexeme.
468func EncodeInvertedIndexKey(inKey []byte, lexeme string) []byte {
469 outKey := make([]byte, len(inKey), len(inKey)+len(lexeme))
470 copy(outKey, inKey)
471 return encoding.EncodeStringAscending(outKey, lexeme)
472}

Callers 2

EncodeInvertedIndexKeysFunction · 0.85
getInvertedExprMethod · 0.85

Calls 1

EncodeStringAscendingFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…