Skip to content

DOC-6843 Add redis-rb (Ruby) Query Engine docs: queryjson - #3641

Merged
andy-stark-redis merged 4 commits into
mainfrom
DOC-6843-redis-rb-query-engine-docs
Jul 31, 2026
Merged

DOC-6843 Add redis-rb (Ruby) Query Engine docs: queryjson#3641
andy-stark-redis merged 4 commits into
mainfrom
DOC-6843-redis-rb-query-engine-docs

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Adds Ruby (redis-rb) coverage for the Query Engine (RediSearch / FT.*).

What's here

  • Page: content/develop/clients/ruby/queryjson.md — a new "Index and query documents" page for Ruby, covering index creation, search, field projection, and aggregation over both JSON and hash documents.
  • Example: local_examples/client-specific/ruby/home_json.rb — the ruby_home_json example set backing the page.
  • Command mappings: redis_rb signatures across the FT.* command-api-mapping files (data/command-api-mapping.json regenerated via build/merge-command-api-mapping.sh).

Notes for reviewers

  • Requires redis-rb v6.0.0 or later (noted on the page).
  • redis-rb's Search::Index strips the index key prefix from returned document IDs — doc.id is the logical id (3), not the full key (user:3) as redis-py returns. The page and example call this out so the output comments don't look like errors.
  • FT.CREATE/SEARCH/AGGREGATE/DROPINDEX carry both the high-level (create_index/search/aggregate/drop) and low-level (ft_*) signatures; the rest carry ft_* only. FT.EXPLAINCLI and FT._LIST are omitted (redis-rb has no method for them).
  • The page embeds the ruby_home_json set; data/examples.json is git-ignored/generated, so the Ruby tab appears when CI regenerates it (not in this diff).
  • Builds on the JSON docs (DOC-6842 Add redis-rb (Ruby) JSON docs #3629), since the page indexes JSON documents.

Verification

home_json.rb runs green against the released redis-rb 6.0.0 gem (published 2026-07-31) on Redis 8.8 with the search module — exit 0, all asserts pass. RESP3-as-default changed no return shapes.

andy-stark-redis and others added 2 commits July 14, 2026 15:39
… command mappings

Preemptive, parked docs for redis-rb's Query Engine (RediSearch), which merged
upstream in redis-rb #1356 but is not yet in a released gem — the latest is
v5.4.1 from July 2025, which predates it. Adds the "Index and query documents"
page for Ruby, a run-verified example set, and redis_rb signatures across the
FT.* command-api-mapping files. Builds on the parked JSON docs (DOC-6842),
since the index-documents page indexes JSON documents.

Three non-obvious things for whoever edits these next. First, the page embeds
the ruby_home_json set, not the query_ft/query_em/etc sets — those back the
search-and-query tutorial pages, a different area, so adding Ruby there is a
separate job. Second, redis-rb's Search::Index strips the index key prefix from
returned document ids, so the client reports the logical id ("3") rather than
the full key ("user:3") as redis-py does; the page and example call this out so
the output comments aren't mistaken for errors. Third, the example's outputs
and REMOVE-block asserts are not guesses — the file was run against the local
redis-rb fork (master, PR #1356) on Redis 8.8 and passed all steps, so the only
real risk is the upstream API changing before the gem ships.

For the mappings, FT.CREATE/SEARCH/AGGREGATE/DROPINDEX carry both the high-level
(create_index/search/aggregate/drop) and the low-level ft_* signature, because
the fork ships that two-layer API deliberately; the rest carry just the ft_*
method. FT.EXPLAINCLI and FT._LIST are omitted — redis-rb has no method for them.

Learned: redis-rb Index strips the key prefix from doc ids; queryjson embeds the *_home_json set not the query_* tutorial sets; outputs run-verified against the fork, not guessed
Constraint: regenerate data/command-api-mapping.json with build/merge-command-api-mapping.sh after editing per-command files — never hand-edit the merged file, and run the script with the sandbox off (its mktemp hits the blocked system temp dir)
Directive: parked — do not merge until redis-rb ships the Query Engine in a released gem; vecsearch.md and Ruby snippets in the search-and-query tutorial pages are deferred follow-ups
Recheck: next redis-rb gem release (Query Engine is master-only via PR #1356)
Gaps: verified against fork master on Redis 8.8, not a released gem — re-run the example and add a "requires redis-rb vX.Y+" note at pickup
Ticket: DOC-6843
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Query Engine support this page documents isn't in a released gem yet, so
warn readers the API is subject to change until pickup.

Ticket: DOC-6843
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@andy-stark-redis andy-stark-redis added do not merge yet parked PR speculatively added based on pre-release info. Check validity when release goes ahead. labels Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

DOC-6843

@github-actions

Copy link
Copy Markdown
Contributor

@andy-stark-redis andy-stark-redis self-assigned this Jul 15, 2026
andy-stark-redis added a commit that referenced this pull request Jul 22, 2026
Renamed the parked-PR thaw skill from `/pickup` to `/unpark` — directory, frontmatter, title, and prose — to free the `/pickup` name for another skill where it fits better; `park`/`unpark` also reads as a cleaner verb pair. Updated the two files that reference it, `/park` and the shared `_shared/park-manifest.md` contract, so the pairing stays consistent. The three parked PRs that instructed `/pickup <n>` (#3611, #3641, #3652) were updated out-of-band so no stale invocation survives. Approved by dwdougherty; Cursor Bugbot clean.

Directive: Two "pickup" strings are left un-renamed on purpose — the historical .claude/state/assess-comments.coverage.md audit log (it records the skill's old name as it was at the time; renaming falsifies history) and the "Trigger to pick up:" manifest field name in park-manifest.md (a header field, not the skill name). Don't "fix" them in a follow-up grep-and-replace.
Ticket: DOC-6876
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…eleased)

redis-rb 6.0.0 shipped the Query Engine (search module) to rubygems.org on
2026-07-31; home_json.rb re-verified green against the released gem on Redis
8.8. Remove the 'not yet in a released gem' banner and add a v6.0.0+ note.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

@andy-stark-redis
andy-stark-redis requested a review from a team July 31, 2026 09:22
@andy-stark-redis andy-stark-redis added clients Client library docs and removed do not merge yet parked PR speculatively added based on pre-release info. Check validity when release goes ahead. labels Jul 31, 2026
@andy-stark-redis

Copy link
Copy Markdown
Contributor Author

Unpark reflection (predicted vs actual) — 2026-07-31

redis-rb 6.0.0 shipped the Query Engine (search/ module) to rubygems.org on 2026-07-31, later than v5.4.1. Trigger fired.

  • Predicted at park (MEDIUM confidence): possible FT.* signature / return-shape drift between fork master (71706ec) and release.
  • Actual: drift was additive and non-breaking71706ec...v6.0.0 touches only two module files: SearchResult gained an optional RESP3-only warnings attr (warnings: [] default), and a new ft_aliaslist method (FT.ALIASLIST, Redis 8.10+). Neither affects total / documents / Document#[] / doc.id / prefix-stripping — the surface this page and its FT.* mappings document is unchanged.
  • Runtime re-verify: home_json.rb ran green against the released 6.0.0 gem on Redis 8.8 (search) — exit 0, all REMOVE-block asserts. RESP3-as-default changed nothing.
  • Reconciliation: removed the preview banner; added a "requires redis-rb v6.0.0 or later" note.

Not done (deliberately): a redis_rb mapping for the new FT.ALIASLIST — new-server-command mappings are another writer's remit. Branch merged up to date with main (110 commits, no conflicts, command-api-mapping.json still valid JSON). hugo --gc exits 0; the only queryjson-related warning is the expected local Example not found "ruby_home_json" (examples.json is git-ignored, regenerated by build/local_examples.py in CI). Ready for /finalize.

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 5 related items from repository history:

Memory updated at e874faf

@andy-stark-redis andy-stark-redis changed the title DOC-6843 Add redis-rb (Ruby) Query Engine docs: queryjson [PARKED] DOC-6843 Add redis-rb (Ruby) Query Engine docs: queryjson Jul 31, 2026

@dwdougherty dwdougherty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

@andy-stark-redis
andy-stark-redis merged commit 8ab2e40 into main Jul 31, 2026
85 of 86 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-6843-redis-rb-query-engine-docs branch July 31, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients Client library docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants