Draft
Conversation
This commit adds support for ParadeDB's pg_search PostgreSQL extension,
which provides BM25-based full-text search as an alternative to the
built-in PostgreSQL text search features.
Key changes:
- Add ParadeDB feature class implementing the @@@ operator and paradedb.score()
- Support for various query types: standard, phrase, prefix, and fuzzy search
- Add migration generator for creating pg_search extension and BM25 indexes
- Include comprehensive tests for ParadeDB functionality
- Add documentation with usage examples
Usage:
PgSearch.multisearch_options = { using: :paradedb }
This provides an alternative search backend using BM25 ranking algorithm
which often provides better relevance scoring than traditional TF-IDF.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit extends ParadeDB support to work with pg_search_scope,
enabling BM25 search on individual models.
Key features:
- Auto-creates BM25 indexes on model tables when using ParadeDB
- Supports all ParadeDB query types (standard, phrase, prefix, fuzzy)
- Handles multi-column searches with proper indexing
- Manages long index names (PostgreSQL 63-char limit)
- Includes primary key in index for paradedb.score() function
- Works alongside existing search methods (tsearch, trigram)
Configuration options:
- query_type: Choose between standard, phrase, prefix, or fuzzy search
- auto_create_index: Enable/disable automatic BM25 index creation
- check_extension: Enable/disable extension verification
- index_name: Specify custom index names
- key_field: Override the primary key field for scoring
Example usage:
pg_search_scope :search_products,
against: [:name, :description],
using: {
paradedb: {
query_type: :phrase,
auto_create_index: true
}
}
Added comprehensive documentation and test scripts to demonstrate
proper usage and integration patterns.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.