Skip to main content

Search Functions

These functions operate on an inverted index — SereneDB's index for full-text, vector and geospatial search. You build a query (most often with the @@ operator and a TSQUERY), optionally rank matches with a relevance scorer and highlight them. The reference is grouped by purpose:

PageFunctions
Full-TextThe @@ match operator, TSQUERY constructors and operators, PostgreSQL-compatible parsers, convenience predicates and ts_lexize
TokenizersEvery dictionary template as a scalar function — split_text, stem_words, generate_ngrams, split_text_csv and the others — one reference page each, for ad hoc analysis without a dictionary
Term DictionaryFacet counts, distinct values, autocomplete and min/max via the ts_dict_* aggregates read from the index dictionary
Vectorl2_distance, cosine_distance, l1_distance and the <-> operator
GeoST_Intersects, ST_Contains, ST_Distance_Between, ST_Distance_Centroid
ScoringBM25, TFIDF and the other relevance scorers
Highlightingts_highlight, ts_offsets

For task-oriented guides see Full-Text Search, Vector Search and Geospatial Search.