Skip to content

lsifstore: apidocs: add utilities for query parsing, ts_rank & tsquery expression generation

Warren Gifford requested to merge sg/apidocs-util-query into main

Created by: slimsag

Stacked on top of #26485, extracted from a larger PR #26483

This change adds a few utilities which will be used for querying the API docs search index:

  • Parsing the (stupidly simple) API docs query syntax.
  • Generating Postgres FTS ts_rank_cd(...) + ts_rank_cd(...)... expressions given a query string, which is needed for ranking results.
  • Generating Postgres FTS tsquery column_name @@ ... OR column_name @@ ... OR column_name @@ ... expressions given a query string, which is needed for actually querying the lsif_data_docs_search_* tables' tsvector indexes.

Helps #21938

Merge request reports

Loading