René's URL Explorer Experiment


Title: DOC-6854 Add redis-rb (Ruby) vector search docs: vecsearch page + ruby_home_query_vec [PARKED] by andy-stark-redis · Pull Request #3652 · redis/docs · GitHub

Open Graph Title: DOC-6854 Add redis-rb (Ruby) vector search docs: vecsearch page + ruby_home_query_vec [PARKED] by andy-stark-redis · Pull Request #3652 · redis/docs

X Title: DOC-6854 Add redis-rb (Ruby) vector search docs: vecsearch page + ruby_home_query_vec [PARKED] by andy-stark-redis · Pull Request #3652 · redis/docs

Description: Preemptive docs for redis-rb's Query Engine vector search: a new "Index and query vectors" page for Ruby (content/develop/clients/ruby/vecsearch.md) and a run-verified ruby_home_query_vec example set. Follow-up to the parked Query Engine docs (DOC-6843 / #3641), which deliberately deferred vector search pending an embedding-library decision — now resolved by reusing the semantic-cache Ruby choice (informers running the ONNX all-MiniLM-L6-v2 encoder locally). ⛔ Do not merge yet The Query Engine landed upstream in redis-rb#1356 (merged) but is not yet in a released gem — the latest is v5.4.1 (July 2025), which predates it. Merging now would document APIs (Redis::Commands::Search::*, create_index, vector_field, KNN search) that gem install redis cannot provide. The page carries a preview bannerText and this PR is labelled parked + do not merge yet. Park manifest Ticket: DOC-6854 Parked at: 2026-07-17 Trigger to pick up: redis-rb#1356 shipped in a released redis gem (a version later than v5.4.1 whose lib/redis/commands/modules/search is present) Labels: parked, do not merge yet Pinned sources (state observed at park time) Source State at park Re-fetch redis-rb#1356 — Query Engine support state: closed, merged: true, head SHA 659d885199d09b997172d753a2f67c39ee23769e, base master, milestone: none, updated 2026-07-14 (squash-merged to master as 71706ec) gh api repos/redis/redis-rb/pulls/1356 --jq '{state, merged, head_sha: .head.sha, base: .base.ref, milestone: .milestone.title, updated_at}' redis-rb released gem latest released v5.4.1 (July 2025) — predates the Query Engine; no release yet contains #1356 gh api repos/redis/redis-rb/tags --jq '.[0:5] | map(.name)' (and check rubygems.org/gems/redis/versions) informers gem (embedding lib) verified working at 1.3.0 (+ onnxruntime 0.11.3, tokenizers 0.7.0) on Ruby 4.0.6; ONNX all-MiniLM-L6-v2, 384-dim — already released, NOT a merge blocker (listed for provenance) gem list informers onnxruntime tokenizers Observed shape the page assumes — confidence: MEDIUM The example was run-verified on 2026-07-17 against the local redis-rb fork (master, PR #1356 merged, head 71706ec) on Redis 8 with informers 1.3.0: ruby -I /lib home_query_vec.rb exited 0, all REMOVE-block asserts passed, and the hash and JSON paths returned identical results. Confidence is MEDIUM rather than HIGH only because it was verified against fork master, not a released gem, so the surface could still shift before release. Key assumptions: Schema DSL Search::Schema.build { text_field; tag_field; vector_field 'embedding', 'HNSW', type: 'FLOAT32', dim: 384, distance_metric: 'L2' }; vector_field extracts :as as a field-level option (verified in lib/redis/commands/modules/search/schema.rb), so the JSON path alias vector_field '$.embedding', 'HNSW', as: 'embedding', … works. KNN query via index.search('*=>[KNN 3 @embedding $vec AS vector_distance]', sort_by:, return_fields:, params: { 'vec' => bytes }); sort_by defaults to ascending (nearest-first). Document#[] exposes doc['vector_distance']. Search::Index strips the index key prefix from returned doc IDs — doc.id is 0, not doc:0 (unlike redis-py). The page/example call this out. Vector encoding: hash fields store raw little-endian float32 (Array#pack('e*')); JSON stores the embedding as a plain Array, but the query parameter is packed bytes either way. Embeddings from informers (model.(text, pooling: 'mean', normalize: true), flat 384-element Array) reproduce the canonical L2 distances to ~7 significant figures — 0.114169895649 / 0.610845208168 / 1.48624789715. Normalisation (unit vectors) is load-bearing for those distances (see commit Constraint: trailers). Re-check checklist (highest risk) Re-run local_examples/client-specific/ruby/home_query_vec.rb against the released gem on Redis 8.x; confirm all steps + asserts still pass and the API shape above is unchanged. (Note: the Redis TCP connection needs the sandbox OFF — Operation not permitted on localhost otherwise.) Confirm the run-verified distances in both expected-output blocks of vecsearch.md still hold on the released gem; update if they shift. Add a "requires redis-rb vX.Y+" note to vecsearch.md once the release version is known. Remove the preview bannerText from vecsearch.md once released. Confirm examples.json regenerates the Ruby tab from ruby_home_query_vec in a full CI build (not run locally). When reconciling, preserve the commit Constraint: trailers — keep normalize on for every encode, and keep the embedding model/library aligned with the semantic-cache Ruby example — or stored vectors stop being comparable across examples. No command-api-mapping work in this PR (the FT.* family is covered by DOC-6843 / #3641). On unpark, then When the trigger fires, run /unpark : it diffs each pinned source against the snapshot above, walks this checklist, then takes the PR through the normal /reflect → /finalize pipeline to merge. The do not merge yet guard holds until /finalize completes. 🤖 Generated with Claude Code NoteLow Risk Documentation and example-only changes with no runtime or production code; main risk is documenting unreleased redis-rb APIs, which the page banner and park manifest already flag. Overview Adds a new Ruby client doc page Index and query vectors (vecsearch.md) that walks through indexing and KNN-searching text embeddings with redis-rb’s Query Engine, using the informers gem and all-MiniLM-L6-v2 locally. The page is wired to a new run-verified example set ruby_home_query_vec (home_query_vec.rb): hash flow with to_bytes / FLOAT32 packing, then a JSON section covering path aliases, array vs binary storage, and packed query params. It also documents redis-rb behaviors such as default query dialect 2, stripped key prefixes on doc IDs, and a preview banner noting Query Engine APIs are not in a released gem yet. Reviewed by Cursor Bugbot for commit 8aedcc0. Bugbot is set up for automated code reviews on this repo. Configure here.

Open Graph Description: Preemptive docs for redis-rb's Query Engine vector search: a new "Index and query vectors" page for Ruby (content/develop/clients/ruby/vecsearch.md) and a run-verified ruby_home_query...

X Description: Preemptive docs for redis-rb's Query Engine vector search: a new "Index and query vectors" page for Ruby (content/develop/clients/ruby/vecsearch.md) and a run-verified rub...

Opengraph URL: https://github.com/redis/docs/pull/3652

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:27cb7c14-b0e3-404d-1884-1144cf4fb145
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id88E6:3C53BD:4341B01:59C9957:6A652233
html-safe-nonce156ade93eb952ed98f9150bcdbc61ac5dd36a99b138fd81c34a067454894929a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEU2OjNDNTNCRDo0MzQxQjAxOjU5Qzk5NTc6NkE2NTIyMzMiLCJ2aXNpdG9yX2lkIjoiMjI1MTI2ODAyMTIwOTYwNDY1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac084eabcae484914de25eb62a59fed8a6b90a6c7e531f60a3c07609b4f0f81a0c
hovercard-subject-tagpull_request:4076312095
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/redis/docs/pull/3652/files
twitter:imagehttps://avatars.githubusercontent.com/u/164213578?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/164213578?s=400&v=4
og:image:altPreemptive docs for redis-rb's Query Engine vector search: a new "Index and query vectors" page for Ruby (content/develop/clients/ruby/vecsearch.md) and a run-verified ruby_home_query...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/redis/docs git https://github.com/redis/docs.git
octolytics-dimension-user_id1529926
octolytics-dimension-user_loginredis
octolytics-dimension-repository_id720117215
octolytics-dimension-repository_nworedis/docs
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id720117215
octolytics-dimension-repository_network_root_nworedis/docs
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release309153364422b3c499922d1a2a6404910a58ed8e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/redis/docs/pull/3652/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fredis%2Fdocs%2Fpull%2F3652%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fredis%2Fdocs%2Fpull%2F3652%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=redis%2Fdocs
Reloadhttps://github.com/redis/docs/pull/3652/files
Reloadhttps://github.com/redis/docs/pull/3652/files
Reloadhttps://github.com/redis/docs/pull/3652/files
Please reload this pagehttps://github.com/redis/docs/pull/3652/files
redis https://github.com/redis
docshttps://github.com/redis/docs
Notifications https://github.com/login?return_to=%2Fredis%2Fdocs
Fork 345 https://github.com/login?return_to=%2Fredis%2Fdocs
Star 74 https://github.com/login?return_to=%2Fredis%2Fdocs
Code https://github.com/redis/docs
Issues 5 https://github.com/redis/docs/issues
Pull requests 31 https://github.com/redis/docs/pulls
Actions https://github.com/redis/docs/actions
Projects https://github.com/redis/docs/projects
Wiki https://github.com/redis/docs/wiki
Security and quality 0 https://github.com/redis/docs/security
Insights https://github.com/redis/docs/pulse
Code https://github.com/redis/docs
Issues https://github.com/redis/docs/issues
Pull requests https://github.com/redis/docs/pulls
Actions https://github.com/redis/docs/actions
Projects https://github.com/redis/docs/projects
Wiki https://github.com/redis/docs/wiki
Security and quality https://github.com/redis/docs/security
Insights https://github.com/redis/docs/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fredis%2Fdocs%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fredis%2Fdocs%2Fissues%2Fnew%2Fchoose
andy-stark-redishttps://github.com/andy-stark-redis
mainhttps://github.com/redis/docs/tree/main
DOC-6854-redis-rb-vecsearch-docshttps://github.com/redis/docs/tree/DOC-6854-redis-rb-vecsearch-docs
Conversation 2 https://github.com/redis/docs/pull/3652
Commits 1 https://github.com/redis/docs/pull/3652/commits
Checks 78 https://github.com/redis/docs/pull/3652/checks
Files changed https://github.com/redis/docs/pull/3652/files
Please reload this pagehttps://github.com/redis/docs/pull/3652/files
DOC-6854 Add redis-rb (Ruby) vector search docs: vecsearch page + ruby_home_query_vec [PARKED] https://github.com/redis/docs/pull/3652/files#top
Show all changes 1 commit https://github.com/redis/docs/pull/3652/files
8aedcc0 DOC-6854 Add redis-rb (Ruby) vector search docs: vecsearch page + rub… andy-stark-redis Jul 17, 2026 https://github.com/redis/docs/pull/3652/commits/8aedcc0ba87bafbeef8ece05c0c1580250dcfeb1
Clear filters https://github.com/redis/docs/pull/3652/files
Please reload this pagehttps://github.com/redis/docs/pull/3652/files
Please reload this pagehttps://github.com/redis/docs/pull/3652/files
vecsearch.md https://github.com/redis/docs/pull/3652/files#diff-a15c2d9a8b248edb5e0f4caf94bf4b5908804d8c9569171e3870d711cceda69e
home_query_vec.rb https://github.com/redis/docs/pull/3652/files#diff-aa3201d12b1ce6e139897e37fc198b4bc4cc2c9b72e06f7f5832811fad1a1c3f
content/develop/clients/ruby/vecsearch.mdhttps://github.com/redis/docs/pull/3652/files#diff-a15c2d9a8b248edb5e0f4caf94bf4b5908804d8c9569171e3870d711cceda69e
View file https://github.com/redis/docs/blob/8aedcc0ba87bafbeef8ece05c0c1580250dcfeb1/content/develop/clients/ruby/vecsearch.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/redis/docs/pull/3652/{{ revealButtonHref }}
Please reload this pagehttps://github.com/redis/docs/pull/3652/files
Please reload this pagehttps://github.com/redis/docs/pull/3652/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.