Skip to content

update pg_textsearch documentation#4722

Merged
atovpeko merged 2 commits intolatestfrom
feat/add-pg-text-search
Mar 31, 2026
Merged

update pg_textsearch documentation#4722
atovpeko merged 2 commits intolatestfrom
feat/add-pg-text-search

Conversation

@erinmikailstaples
Copy link
Copy Markdown
Collaborator

@erinmikailstaples erinmikailstaples commented Mar 30, 2026

Describe your changes

This pull request updates documentation to announce the general availability (GA) of the pg_textsearch extension (v1.0.0) and revises guidance to reflect its production-ready status. It introduces new features, updated usage examples, configuration options, and clarifies current limitations and best practices for both cloud and self-hosted environments.

Major documentation updates for GA release:

  • GA Announcement and Feature Highlights:
    • Added a changelog entry and tags to announce pg_textsearch v1.0.0 as production ready, including new features such as the bm25_force_merge() function, implicit query syntax, new GUCs for tuning and debugging, and support for PostgreSQL 17 and 18. [1] [2] [3] [4] [5]

Updated usage and best practices:

  • Query Syntax Improvements:

    • Updated examples and procedures to recommend the new implicit <@> query syntax and clarified when to use explicit index specification with to_bm25query(), especially in PL/pgSQL contexts. [1] [2] [3] [4]
  • Filtering and Performance Guidance:

    • Added a new section on filtering strategies (pre-filtering vs. post-filtering) and their tradeoffs for BM25 index scans.

New and revised reference content:

  • bm25query Data Type and Operators:

    • Documented the bm25query data type, constructor functions, cast syntax, and available operators for advanced query scenarios.
  • Configuration and Maintenance:

    • Added documentation for new GUCs (segments_per_level, log_scores), force merge operation, and clarified index maintenance and diagnostic functions, including restrictions in production builds. [1] [2] [3]

Limitations and deployment:

  • Current Limitations and Self-hosting:
    • Updated and expanded the limitations section, including phrase search, expression indexing, faceted search, write performance, and PL/pgSQL syntax restrictions. Added instructions for self-hosted installation and clarified crash recovery behavior.

These changes ensure the documentation accurately reflects the production readiness of pg_textsearch and provides clear, up-to-date guidance for users deploying and operating the extension.

Related Issues

N/A

Checklist before requesting a review

  • - Is this ready for review? If not, raise as a draft PR
  • - This has deployed to a staging environment correctly
  • - I have reviewed my changes.
  • - I have confirmed the content is technically accurate.
  • - I have confirmed the content is free of typos or grammar errors.
  • - I have reviewed the deployed version of my changes.
  • - I have tested any code that is added or updated.
  • - I have verified all images and videos are clear, with appropriate zoom.
  • - I have verified all images and videos match production (or dev for unreleased features).
  • - I have tested that the content matches the functionality in production (or dev for unreleased features).
  • - All checks have passed.
  • - This references a feature that is public. If not, add a note and we can schedule the merge for after the feature release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Allow 10 minutes from last push for the staging site to build. If the link doesn't work, try using incognito mode instead. For internal reviewers, check web-documentation repo actions for staging build status. Link to build for this PR: http://docs-dev.timescale.com/docs-feat-add-pg-text-search

@erinmikailstaples erinmikailstaples marked this pull request as ready for review March 30, 2026 20:05
) STORED;
CREATE INDEX ON documents USING bm25(search_text) WITH (text_config = 'english');
```
* **No built-in faceted search**: `pg_textsearch` does not provide dedicated faceting operators. Use standard $PG
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example involving counts is a little weird. We should just show a query with a WHERE clause that involves filtering based on other columns of the table (e.g., "price < X" or whatever). We should avoid showing WHERE clauses that filter on the numeric value produced by <@>, the robot loves these for some reason but they don't make much practical sense.

Signed-off-by: Erin Mikail Staples <54031531+erinmikailstaples@users.noreply.github.com>
@atovpeko atovpeko merged commit 8166af7 into latest Mar 31, 2026
3 checks passed
@atovpeko atovpeko deleted the feat/add-pg-text-search branch March 31, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pg_textsearch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants