package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
DecodeTSQuery deserializes a serialized TSQuery in on-disk format.
DecodeTSQueryPGBinary deserializes a serialized TSQuery in pgwire format.
DecodeTSVector decodes a tsvector in disk-storage representation from the input byte slice.
DecodeTSVectorPGBinary decodes a tsvector from the input byte slice which is formatted in Postgres binary protocol.
DocumentToTSVector parses an input document into lexemes, removes stop words, stems and normalizes the lexemes, and returns a TSVector annotated with lexeme positions according to a text search configuration passed by name.
EncodeInvertedIndexKey returns the inverted index key for the input lexeme.
EncodeInvertedIndexKeys returns a slice of byte slices, one per inverted index key for the terms in this tsvector.
EncodeTSQuery encodes a tsquery into a serialized representation for on-disk storage.
EncodeTSQueryPGBinary encodes a tsquery into a serialized representation.
EncodeTSVector encodes a tsvector into a serialized representation for on-disk storage.
EncodeTSVectorPGBinary encodes a tsvector into a serialized representation that's identical to Postgres's wire protocol representation.
EvalTSQuery runs the provided TSQuery against the provided TSVector, returning whether or not the query matches the vector.
GetConfigKey returns a config that can be used as a key to look up stemmers and stopwords from an input config value.
ParseTSQuery produces a TSQuery from an input string.
ParseTSVector produces a TSVector from an input string.
PhraseToTSQuery implements the phraseto_tsquery builtin, which lexes an input, performs stopwording and normalization on the tokens, and returns a parsed query, interposing the <-> operator between each token.
PlainToTSQuery implements the plainto_tsquery builtin, which lexes an input, performs stopwording and normalization on the tokens, and returns a parsed query, interposing the & operator between each token.
RandomTSQuery returns a random TSQuery for testing.
RandomTSVector returns a random TSVector for testing.
Rank implements the ts_rank functionality, which ranks a tsvector against a tsquery.
ToTSQuery implements the to_tsquery builtin, which lexes an input, performs stopwording and normalization on the tokens, and returns a parsed query.
TSLexize implements the "dictionary" construct that's exposed via ts_lexize.
TSParse is the function that splits an input text into a list of tokens.
ValidConfig returns an error if the input string is not a supported and valid text search config.
# Type aliases
TSVector is a sorted list of terms, each of which is a lexeme that might have an associated position within an original document.