DOC-6994 Document JSON HIGHLIGHT/SUMMARIZE support and limitations [PARKED] - #3858
Open
dwdougherty wants to merge 3 commits into
Open
DOC-6994 Document JSON HIGHLIGHT/SUMMARIZE support and limitations [PARKED]#3858dwdougherty wants to merge 3 commits into
dwdougherty wants to merge 3 commits into
Conversation
MOD-16530 relaxes the engine's blanket rejection of HIGHLIGHT and SUMMARIZE on JSON indexes. Four surfaces touched the topic and all three of the ones with prose disagreed with each other and with the engine, so the rules now live in one place on the Highlighting page and indexing, ft.search and the administration overview point at it instead of restating. The surprise was which direction the docs were wrong in. indexing/_index.md already described roughly the post-fix behaviour and shipped a worked example, while the engine had rejected every JSON highlight since 2024 — so this change mostly makes the docs true rather than new. Two rules were never documented anywhere, and they are the substance of the addition: JSON requires an explicit RETURN, and a single-value path resolving to an array or object is accepted but silently skipped. Nothing here was executed. The fix is unreleased, so every example output is transcribed from the assertions in RediSearch PR 9410's pytest suite. I left out a SUMMARIZE reply body and the array-skip reply on purpose — their output is dialect-dependent and the tests only assert substring containment, so inventing those two blocks was the one way this page could have shipped fabricated output. Learned: docs claimed post-fix behaviour years before the engine had it; the fix made prose true rather than adding to it Constraint: every FT.SEARCH reply on the Highlighting page is transcribed from RediSearch PR 9410 pytest assertions, not from a running engine — re-derive from the tests rather than hand-editing Directive: do not add SUMMARIZE or array-skip reply bodies to the JSON examples without running a build that has the fix; their output is dialect-dependent Rejected: hand-editing data/commands_redisearch.json and data/commands_core.json | regenerated at release-docs time, so the edit would be silently superseded Rejected: page-level bannerText as the unreleased-feature guard | it banners the whole page, which would misdescribe 900 lines of GA content on ft.search.md — the version statement is the right section-level guard Recheck: the version lines in both TODO comments, once RediSearch backport PR 11046 merges and a maintenance release actually ships Gaps: no engine verification was possible; the vendored tmp/RediSearch checkout predates the fix and contradicts it Ticket: DOC-6994 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Contributor
🧠 Redis MemoryFound 7 related items from repository history:
Memory updated at 47ac77e |
Contributor
andy-stark-redis
approved these changes
Aug 26, 2026
andy-stark-redis
left a comment
Contributor
There was a problem hiding this comment.
Couple of minor comments but otherwise LGTM.
10 tasks
…t.md Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com>
Collaborator
Author
|
Thank you for the review, @andy-stark-redis! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents JSON
HIGHLIGHT/SUMMARIZEbehaviour after MOD-16530 relaxes the engine's blanket rejection.The canonical rules now live in one
## JSON indexessection on the Highlighting page;indexing/_index.md,ft.search.mdandadministration/overview.mdpoint at it instead of restating. Before this change all three disagreed with each other and with the engine —indexing/_index.mdalready described roughly the post-fix behaviour and shipped a worked example, while the engine had rejected every JSON highlight since 2024. Two rules were never documented anywhere: JSON requires an explicitRETURN, and a single-value JSONPath resolving to an array or object is accepted but silently skipped.The fix is not in any released version. The latest tags on the affected lines are
v8.4.10,v8.6.8,v8.8.0andv8.10.0; the fix needs 8.4.13 / 8.6.10 / 8.8.1 / 8.10.1. The 8.6 backport (RediSearch#11046) is still open. Merging now would tell every current reader that JSON highlighting works when the engine still returnsHIGHLIGHT/SUMMARIZE is not supported with JSON indexes.Both pages carry a
<!-- TODO(DOC-6994) -->comment where the version statement goes. Those must be resolved before merge.Park manifest
Ticket: DOC-6994
Parked at: 2026-08-25
Trigger to pick up: the 8.4 line ships the fix — a non-prerelease tag
v8.4.13(or later 8.4.x) exists and PR #11048's merge commitd526e7ec03931f36469a7f216b76e1ec089f67dais an ancestor of it (gh api repos/RediSearch/RediSearch/compare/d526e7ec03931f36469a7f216b76e1ec089f67da...v8.4.13 --jq '{status,behind_by}'→behind_by: 0) — and PR #11046 (8.6) has merged, so the version statement can name every affected line.Labels: parked, do not merge yet
Pinned sources (state observed at park time, 2026-08-25)
Backports target the release branches directly, so these are the branches the releases are cut from.
masterbd3ec5dca46c22b54f0673104b64fd9020febade, heade9d8b09f3b36ee141e48553a66f309c2f088985e, updated 2026-08-21T16:29:33Zgh api repos/RediSearch/RediSearch/pulls/9410 --jq '{state,merged,merge_commit_sha,head_sha:.head.sha,base:.base.ref,updated_at}'mastera3a09eb58e2ec51940fbd1c1402a2c80a8032a04, updated 2026-08-24T23:54:41Zgh api repos/RediSearch/RediSearch/pulls/11106 --jq '{state,merged,merge_commit_sha,updated_at}'8.4d526e7ec03931f36469a7f216b76e1ec089f67da, updated 2026-08-25T00:57:39Zgh api repos/RediSearch/RediSearch/pulls/11048 --jq '{state,merged,merge_commit_sha,updated_at}'8.6b8bf56a87f20f7f307d06aea4247bff103a3e9cc, updated 2026-08-24T23:06:50Zgh api repos/RediSearch/RediSearch/pulls/11046 --jq '{state,merged,merge_commit_sha,head_sha:.head.sha,updated_at}'8.8fe67f90b86ab478c0060e649670ee1b83e76b2b9, updated 2026-08-25T09:46:32Zgh api repos/RediSearch/RediSearch/pulls/11044 --jq '{state,merged,merge_commit_sha,updated_at}'8.10553687a37d9905d6a1538aa22a01f137e8c14a5c, updated 2026-08-25T01:42:10Zgh api repos/RediSearch/RediSearch/pulls/11043 --jq '{state,merged,merge_commit_sha,updated_at}'8.2merged: false), updated 2026-08-24T18:11:20Z. Consistent with Jira having no 8.2.x fix version — so 8.2 does not get the fix.gh api repos/RediSearch/RediSearch/pulls/11049 --jq '{state,merged,updated_at}'8.6-rse518ca89cbc9830d505cea94f35bd999f4ad396f8, updated 2026-08-25T07:45:46Zgh api repos/RediSearch/RediSearch/pulls/11047 --jq '{state,merged,merge_commit_sha,updated_at}'8.8-rsebfb2aa1186d9272166f6e76bedc12805ef04a01a, updated 2026-08-24T23:46:39Zgh api repos/RediSearch/RediSearch/pulls/11045 --jq '{state,merged,merge_commit_sha,updated_at}'v8.4.10,v8.6.8,v8.8.0,v8.10.0.v8.4.13does not exist (404). Nothing shipped.gh api 'repos/RediSearch/RediSearch/tags?per_page=100' --jq '.[].name' | grep -E '^v8\.(4|6|8|10)\.'released: false: RediSearch 8.4.13, 8.6.10, 8.8.1, 8.10.1, RediSearchEnterprise 8.6.11 / 8.8.5, Open Source 8.12 (2026-10-30)getJiraIssue MOD-16530getJiraIssue MOD-17663Observed shape the page assumes
Semantics — confidence HIGH. These held identically across dialects 1–3+ in the merged test suite, and are the shape of the page:
RETURNnaming the field → works, output matches HASH for the same content.RETURN, orRETURN 0→ rejected. Rationale documented on the page: withoutRETURN, JSON loads as one serialized value so individual fields never reach the highlighter.RETURNnot required.Identifiers — confidence LOW. Every string below is transcribed from a diff and a test suite, never from a running engine, because no release contains the fix. Error strings are prose in
QueryError_SetErrorcalls and are exactly the kind of thing that gets reworded between merge and release. Tick each one off individually on unpark:HIGHLIGHT/SUMMARIZE on JSON indexes requires RETURN with explicit field names— seen insrc/aggregate/aggregate_request.c,AREQ_ApplyContext, PR #9410 diff; asserted asno_return_errorintests/pytests/test_json.py.HIGHLIGHT/SUMMARIZE is not supported for JSON fields with multi-value JSONPath— seen insrc/aggregate/aggregate_request.c,AREQ_HasMultiValueHighlightFields, PR #9410 diff; asserted asmulti_value_error.Property `alias` is not in schema— asserted asalias_errorintests/pytests/test_json.py. Pre-existing schema validation, not added by #9410 — so if it's absent on unpark the cause is a different change, not a rename.Noise-cancelling <b>Bluetooth</b> headphones, anddescriptionleft un-highlighted whenHIGHLIGHT FIELDS 1 nameis used — output shape fromtest_highlight_single_value_json. The doc example reuses that fixture's content but its own key (item:1) and index name (itemIdx).RETURN 0producing the same error as omittingRETURN— asserted intest_json.py, not separately stated in the C diff.Where the record and the source disagree: DOC-6994's description says "Fixed in 8.4 onward". The GitHub PR list initially looks like an 8.2 backport merged too; it did not (
merged: false). Trust themergedfield, not the closure.Re-check checklist
Harvested from the branch's
/reflecttrailers, plus predicted-to-change items.Highest risk:
<!-- TODO(DOC-6994) -->version comments —advanced-concepts/highlight.mdandindexing/_index.md. Confirm the exact patch version per line with Omer Shadmi / Abid Saudagar. Follow the maintenance-line wording precedent atadministration/configuration.md→search-bg-index-sleep-duration-us. Current evidence says 8.4 / 8.6 / 8.8 / 8.10 / OSS 8.12 and not 8.2.AREQ_HasMultiValueHighlightFieldson the release tag rather than trusting #11106's PR body.Constrainttrailer: everyFT.SEARCHreply on the Highlighting page came from pytest assertions, not execution.Also:
Directivetrailer: a SUMMARIZE reply body and the array-skip reply were deliberately omitted because their output is dialect-dependent and the tests only assert substring containment. Add them only with a real build — do not reconstruct them by hand.highlight.mdis stale.data/commands_redisearch.json(lines ~1061, ~1112) anddata/commands_core.json(~11354, ~11409). They still carry the old blanket "not currently supported" summaries; upstreamcommands.jsonwas updated in #9410. Deliberately not hand-edited — these are regenerated at release-docs time, so the edit would have been silently superseded.bannerTextsubstitution still reads correctly./parkStep 4 normally wants a page-levelbannerText; it was deliberately not added, because it banners the entire page and would misdescribe ~900 lines of GA content onft.search.md. The section-level version statement is the guard instead. Not an oversight.Gapstrailer:tmp/RediSearchwas last fetched 2026-07-30 and itsmasterpredates and contradicts this fix — itsaggregate_request.cstill carries the blanket rejection on all of8.0–8.10. Do not use it to verify. Re-fetch or read upstream viagh.hugoand confirm the five cross-links still resolve (#json-indexesanchor onhighlight.md, linked fromindexing/_index.md×2 andadministration/overview.md).On unpark, then
When the trigger fires, run
/unpark <PR>. It reconciles the docs against the now-settled source and takes the PR through the normal/reflect→/finalizepipeline to merge./finalizeis deferred until then — squashing now would discard the episodic trailers this manifest was built from. Thedo not merge yetguard holds until/finalizecompletes.Note
Low Risk
Documentation-only changes with no runtime impact; the main risk is publishing before the engine fix releases, which the PR explicitly guards with TODOs and a park manifest.
Overview
Documents JSON index behavior for
FT.SEARCHHIGHLIGHTandSUMMARIZEafter the engine stops rejecting them outright (MOD-16530). The canonical rules live in a new## JSON indexessection on the Highlighting page: explicitRETURNis required, multi-value JSONPaths are rejected with named errors,RETURNaliases cannot be used inHIGHLIGHT/SUMMARIZE FIELDS, and single-value paths that resolve to arrays/objects return unhighlighted values without error.ft.search.md, the search technical overview, and JSON indexing pages no longer restate conflicting snippets—they add short JSON caveats and link to#json-indexes. The indexing guide also clarifiesRETURN 0rejection, expands the highlight note (including array/object skip), documents the multi-value error under index limitations, and setshideListLinks: trueon the indexing section front matter.<!-- TODO(DOC-6994) -->placeholders remain for version/maintenance-line wording until the fix ships in released builds; the PR description marks it parked / do not merge until then.Reviewed by Cursor Bugbot for commit 47ac77e. Bugbot is set up for automated code reviews on this repo. Configure here.