pg_search 在 Neon 上可用

  • Partnership: Neon has teamed up with ParadeDB to bring pg_search to all Neon users, offering faster and more powerful full-text search in Postgres.
  • Postgres' Gaps: Native Postgres full-text search via tsvector and tsquery has several limitations, such as not being optimized for ranking, having an ineffective built-in ranking method, lacking fuzzy search, inefficient faceted search, and limited advanced features.
  • pg_search Features: It is a high-performance full-text search extension for Postgres written in Rust via the pgrx framework. It implements the BM25 algorithm for true search-engine ranking, introduces a custom inverted index within Postgres that is faster and a covering index, and is fully integrated with Postgres' MVCC transaction system with real-time indexing.
  • Benchmark Details: Compared pg_search to a tuned Postgres GIN-based setup on a 10-million-row Neon database. The benchmark included various queries like COUNT, highlighting, bucket/group-by, top-N, cardinality, and filtered queries. Optimized Postgres with multiple indexes. pg_search's BM25 index builds faster and outperformed tuned Postgres for some queries by up to 1,000x.
  • Installation and Availability: pg_search is available for all Neon databases in AWS regions running Postgres 17. To install, run CREATE EXTENSION IF NOT EXISTS pg_search;. Docs are available at [https://neon.tech/docs/extens...].
  • Full Benchmark Results: A detailed table shows the average search time for pg_search and tuned Postgres for different queries.
阅读 7
0 条评论