rig-integrations/rig-vectorize/README.md
Vector store integration for Cloudflare Vectorize. This integration supports vector similarity search and document insertion using Rig's embedding providers.
You can find end-to-end examples here.
For Vectorize-specific questions, ask in the Cloudflare Developers Discord.
Integration tests require a real Cloudflare Vectorize index.
npx wrangler vectorize create rig-integration-test --dimensions=1536 --metric=cosine
export CLOUDFLARE_ACCOUNT_ID="your-account-id"
export CLOUDFLARE_API_TOKEN="your-api-token"
export VECTORIZE_INDEX_NAME="rig-integration-test"
cargo test --package rig-vectorize --test integration_tests -- --test-threads=1
Tests run sequentially (--test-threads=1) to avoid conflicts since they clear the index before each test.
Note: Vectorize has eventual consistency. Tests wait 5 seconds after inserting documents before querying (configured via EVENTUAL_CONSISTENCY_DELAY constant).
Filter tests require metadata indexes. Without them, filter tests will be skipped:
npx wrangler vectorize create-metadata-index rig-integration-test --property-name=category --type=string
npx wrangler vectorize create-metadata-index rig-integration-test --property-name=id --type=string