Skip to content

Proxy search#270

Merged
ChuckHend merged 11 commits into
mainfrom
proxy-search
May 20, 2026
Merged

Proxy search#270
ChuckHend merged 11 commits into
mainfrom
proxy-search

Conversation

@ChuckHend

@ChuckHend ChuckHend commented May 12, 2026

Copy link
Copy Markdown
Owner

Further work on implementing a proxy that enables the following on any postgres w/ pgvector installed:

SELECT *
FROM vectorize.search(job=>'my_job', query=>'camping backpack', num_results=>3)

vectorize.search is accessible only through the proxy and not through a direction connection to postgres. It is not a function in the database, rather it is only parsed and transformed in the proxy.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR continues the “proxy search” work by adding support for rewriting vectorize.search(...) SQL calls inside the PostgreSQL wire-protocol proxy into the underlying hybrid-search SQL (with embeddings generated by the proxy), plus adds a standalone vectorize-proxy binary and integration tests/docs to exercise the behavior.

Changes:

  • Add parsing + rewriting for vectorize.search() in the proxy message pipeline, producing result sets as raw table rows (not JSON).
  • Introduce a dedicated vectorize-proxy CLI binary and refactor the proxy accept loop into a reusable run_proxy_loop.
  • Add proxy-focused README + integration tests to validate projection/ordering/limit semantics through the proxy.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
proxy/tests/proxy.rs Adds end-to-end integration tests covering passthrough and vectorize.search() query shapes.
proxy/src/proxy.rs Extracts the TCP accept loop into a reusable run_proxy_loop used by both library and binary.
proxy/src/message_parser.rs Detects vectorize.search() in Simple Query + Parse messages and rewrites SQL before forwarding.
proxy/src/main.rs Adds a standalone vectorize-proxy binary with CLI/env configuration and cache sync listener startup.
proxy/src/embeddings.rs Implements parse_search_calls and rewrite_search_query that expands vectorize.search() into hybrid-search SQL rows.
proxy/README.md Documents how to run the proxy and query vectorize.search() through it.
proxy/Cargo.toml Adds bin/lib sections, clap dependency, and dev-dependencies.
docker-compose.yml Bumps the Postgres/pgvector image tag.
core/src/query.rs Refactors hybrid-search SQL generation and introduces hybrid_search_query_rows for non-JSON row results.
Cargo.lock Updates lockfile for added/changed dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread proxy/README.md Outdated
Comment thread proxy/tests/proxy.rs
Comment thread proxy/src/main.rs
Comment thread proxy/src/main.rs
Comment thread proxy/src/main.rs
Comment thread proxy/src/message_parser.rs
Comment thread proxy/src/embeddings.rs Outdated
Comment thread proxy/Cargo.toml Outdated
@ChuckHend
ChuckHend marked this pull request as ready for review May 20, 2026 22:21
@ChuckHend
ChuckHend merged commit af52e43 into main May 20, 2026
5 checks passed
@ChuckHend
ChuckHend deleted the proxy-search branch May 20, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants