Skip to main content
Ctrl+K

asd-def

  • analysis
  • figures
  • dscat
  • docs
  • analysis
  • figures
  • dscat
  • docs

Section Navigation

Guides

  • Using the CLI
  • Adding a dataset version
  • Adding a new dataset
  • Synonyms

Reference

  • API reference
    • FeatureRow
    • TableRow
    • DatasetConfig
    • Version
    • Catalogue
    • run_ingest
    • IngestSummary
    • parse
    • discover_versions
    • load_configs
    • version_sort_key
    • list_tables
    • describe
    • search
    • expand_query
    • find_feature
    • feature_sources
    • list_documents
    • find_documents
    • latest_version_map
    • diff_versions
    • DiffResult
    • discover_docs
    • Engine
    • resolve_engine
    • convert_doc
    • extract_sections
    • cache_path
    • sheet_names
    • read_sheet
    • Format
    • render
    • find_repo_root
    • data_root
    • catalogue_dir
    • index_path
    • docs_cache_dir
    • load_synonyms
  • Catalogue schema
  • dscat
  • API reference
  • search

search#

dscat.queries.search(cat, query, dataset, version, all_versions, table_name, scale, limit, raw)[source]#

Full-text search features by name, title, definition, value coding, and notes.

Query terms expand through the synonym table and run as an FTS5 BM25 match, where a lower rank is a better match. Set raw to pass an FTS5 MATCH expression through unchanged.

Parameters:
  • cat (dscat.index.Catalogue) – Open catalogue to read from.

  • query (str) – Search text, or a raw FTS5 MATCH expression when raw is set.

  • dataset (str or None) – Restrict to one dataset.

  • version (str or None) – Pin a version (needs dataset); the default scope is the latest.

  • all_versions (bool) – Search every version instead of only the latest.

  • table_name (str or None) – Restrict to one table.

  • scale (str or None) – Keep only features with this field type or measurement scale.

  • limit (int) – Maximum number of rows to return.

  • raw (bool) – Treat query as a verbatim FTS5 MATCH expression.

Returns:

Matching features with their rank, best first.

Return type:

collections.abc.Sequence of sqlalchemy.engine.RowMapping

previous

describe

next

expand_query

On this page
  • search()
Show Source

© Copyright 2026, Tahmid Azam.

Created using Sphinx 9.1.0.

Built with the PyData Sphinx Theme 0.18.0.