-
Notifications
You must be signed in to change notification settings - Fork 14
Add initial version of ParadeDB extension #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
LocalStack extension for ParadeDB (PostgreSQL-based search and analytics). Features: - Runs paradedb/paradedb Docker container - Exposes PostgreSQL port 5432 for direct connections - Configurable via PARADEDB_POSTGRES_USER/PASSWORD/DB env vars - Integration tests for basic SQL and pg_search BM25 functionality - CI workflow for automated testing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update tests to use the new ParadeDB v2 API: - Use CREATE INDEX ... USING bm25 instead of CALL paradedb.create_bm25() - Use ||| operator for disjunction (OR) search - Use &&& operator for conjunction (AND) search - Use pdb.score() for relevance scoring - Use DROP INDEX instead of paradedb.drop_bm25() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| logging.basicConfig() | ||
|
|
||
|
|
||
| class DatabaseDockerContainerExtension(Extension): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This class is very similar to the existing ProxiedDockerContainerExtension - aiming to extract that into a reusable util package in a separate PR shortly. 👍
| authors = [ | ||
| { name = "LocalStack team"} | ||
| ] | ||
| keywords = ["LocalStack", "ParadeDB", "PostgreSQL"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add "Search" and "Analytics"
|
|
||
| Once the extension is running, you can connect to ParadeDB using any PostgreSQL client with the following default credentials: | ||
|
|
||
| - **Host**: `localhost` (or the Docker host if running in a container) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use different values than postgres here. See: https://docs.paradedb.com/documentation/getting-started/install
| - **pg_search**: Full-text search with BM25 ranking | ||
| - **pg_analytics**: DuckDB-powered analytics for OLAP workloads | ||
| - **pg_lakehouse**: Query data lakes (S3, Delta Lake, Iceberg) directly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorect. AI? We only have one extension, pg_search, which does both search and analytics workloads
| ); | ||
|
|
||
| -- Search with BM25 scoring | ||
| SELECT * FROM products.search('description:electronics'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong
| ); | ||
|
|
||
| -- Create a BM25 search index | ||
| CALL paradedb.create_bm25( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super wrong too. We have agents skills: https://docs.paradedb.com/welcome/ai-agents
I'd recommend importing this to your Claude and trying again.
| * `PARADEDB_POSTGRES_USER`: PostgreSQL username (default: `postgres`) | ||
| * `PARADEDB_POSTGRES_PASSWORD`: PostgreSQL password (default: `postgres`) | ||
| * `PARADEDB_POSTGRES_DB`: Default database name (default: `postgres`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good to me. Relatively high-level, but it seems reasonable
LocalStack extension for ParadeDB (PostgreSQL-based search and analytics).
🤖 Note: The code was predominantly generated via Claude Code (with some small manual corrections), using the following prompt:
Features:
/cc @ankitml @philippemnoel