Skip to content

DOC-6994 Document JSON HIGHLIGHT/SUMMARIZE support and limitations [PARKED] - #3858

Open
dwdougherty wants to merge 4 commits into
mainfrom
DOC-6994
Open

DOC-6994 Document JSON HIGHLIGHT/SUMMARIZE support and limitations [PARKED]#3858
dwdougherty wants to merge 4 commits into
mainfrom
DOC-6994

Conversation

@dwdougherty

@dwdougherty dwdougherty commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Documents JSON HIGHLIGHT/SUMMARIZE behaviour after MOD-16530 relaxes the engine's blanket rejection.

The canonical rules live in one ## JSON indexes section on the Highlighting page; indexing/_index.md, ft.search.md and administration/overview.md point at it instead of restating. Before this change all three disagreed with each other and with the engine — 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. Two rules were never documented anywhere: JSON requires an explicit RETURN, and a single-value JSONPath resolving to an array or object is accepted but silently skipped.

⚠️ Do not merge yet

The engine work is done — every backport has merged and MOD-16530 is Closed/Done — but nothing has shipped. The latest tags on the affected lines are v8.4.10, v8.6.8, v8.8.0, v8.10.0. Every Jira fix version is still released: false, with 8.4.14 / rse 8.6.12 / rse 8.8.6 targeting 2026-09-30 and Open Source 8.12 targeting 2026-10-30.

Merging now would tell every current reader that JSON highlighting works when the engine still returns HIGHLIGHT/SUMMARIZE is not supported with JSON indexes.

Open question blocking merge: the pages now assert specific patch versions, and the 8.4 number is disputed — see checklist item 1.

Park manifest

Ticket: DOC-6994
Parked at: 2026-08-25 (re-parked 2026-09-08)
Trigger to pick up: a non-prerelease 8.4.x tag exists whose ancestry includes PR #11048's merge commit d526e7ec03931f36469a7f216b76e1ec089f67da. Deliberately phrased as an ancestry check rather than a tag name, because the target patch number has already moved once (8.4.13 → 8.4.14) and is still disputed. Test it by finding the first 8.4.x tag above v8.4.10 and running gh api repos/RediSearch/RediSearch/compare/d526e7ec03931f36469a7f216b76e1ec089f67da...<tag> --jq '{status,behind_by}', expecting behind_by: 0. As of 2026-09-08 no such tag exists (v8.4.11, v8.4.13, v8.4.14 all 404).
Labels: parked, do not merge yet

Pinned sources (state observed at re-park time, 2026-09-08)

Backports target the release branches directly, so these are the branches the releases are cut from. Changes since the 2026-08-25 park are marked ▲.

Source State at re-park time Re-fetch
RediSearch#9410 — primary impl, master merged, merge bd3ec5dca46c22b54f0673104b64fd9020febade, updated 2026-08-21T16:29:33Z gh api repos/RediSearch/RediSearch/pulls/9410 --jq '{state,merged,merge_commit_sha,updated_at}'
RediSearch#11106 — follow-up, master merged, merge a3a09eb58e2ec51940fbd1c1402a2c80a8032a04, updated 2026-08-24T23:54:41Z gh api repos/RediSearch/RediSearch/pulls/11106 --jq '{state,merged,merge_commit_sha,updated_at}'
RediSearch#11048 — backport, base 8.4 merged 2026-08-25T00:57:38Z, merge d526e7ec03931f36469a7f216b76e1ec089f67dathis is the trigger commit gh api repos/RediSearch/RediSearch/pulls/11048 --jq '{state,merged,merge_commit_sha,merged_at}'
RediSearch#11046 — backport, base 8.6 merged 2026-08-30T11:58:54Z by oshadmi, merge 25d7b56de47e896ee9a60677459aa1148128c1d2. Was OPEN at park time and recorded as "the blocker" — that half of the old trigger is now satisfied. Landed with 3 cherry-pick conflicts resolved (Rust rlookup loader absent from 8.6, so those file changes were dropped; C loader used instead). gh api repos/RediSearch/RediSearch/pulls/11046 --jq '{state,merged,merge_commit_sha,merged_at}'
RediSearch#11044 — backport, base 8.8 merged, merge fe67f90b86ab478c0060e649670ee1b83e76b2b9 gh api repos/RediSearch/RediSearch/pulls/11044 --jq '{state,merged,merge_commit_sha,updated_at}'
RediSearch#11043 — backport, base 8.10 merged, merge 553687a37d9905d6a1538aa22a01f137e8c14a5c gh api repos/RediSearch/RediSearch/pulls/11043 --jq '{state,merged,merge_commit_sha,updated_at}'
RediSearch#11049 — backport, base 8.2 closed WITHOUT merging (merged: false). Confirmed by oshadmi in review: "8.2 doesn't include the fix." gh api repos/RediSearch/RediSearch/pulls/11049 --jq '{state,merged,updated_at}'
RediSearch#11047 — backport, base 8.6-rse merged, merge 518ca89cbc9830d505cea94f35bd999f4ad396f8 gh api repos/RediSearch/RediSearch/pulls/11047 --jq '{state,merged,merge_commit_sha,updated_at}'
RediSearch#11045 — backport, base 8.8-rse merged, merge bfb2aa1186d9272166f6e76bedc12805ef04a01a gh api repos/RediSearch/RediSearch/pulls/11045 --jq '{state,merged,merge_commit_sha,updated_at}'
Release tags on affected lines latest are v8.4.10, v8.6.8, v8.8.0, v8.10.0. Nothing shipped — unchanged since park. gh api 'repos/RediSearch/RediSearch/tags?per_page=100' --jq '.[].name' | grep -E '^v8\.(4|6|8|10)\.'
MOD-16530 ▲ status Closed, resolution Done (was "In Backport, unresolved"). ▲ Fix versions now: RediSearch v8.4.14 (2026-09-30), v8.6.10, v8.8.1, v8.10.1, RediSearchEnterprise v8.6.12 / v8.8.6 (both 2026-09-30), Open Source 8.12 (2026-10-30). All released: false. v8.4.13 has been removed from the list, and rse 8.6.11 / 8.8.5 were replaced by 8.6.12 / 8.8.6. Jira updated 2026-08-31. Atlassian MCP getJiraIssue MOD-16530
MOD-17663 — projection-alias support status To Do, no fix versions, updated 2026-08-16. Unchanged. Would invalidate the projection-alias bullet if it lands. Atlassian MCP getJiraIssue MOD-17663

Observed shape the page assumes

Semantics — confidence HIGH. Held identically across dialects 1–3+ in the merged test suite; this is the shape of the page and it survived review unchanged:

  • Single-value JSONPath to a scalar, with RETURN naming the field → works, output matches HASH for the same content.
  • No RETURN, or RETURN 0 → rejected. Rationale on the page: without RETURN, JSON loads as one serialized value so individual fields never reach the highlighter.
  • Multi-value JSONPath anywhere in the returned/highlighted set → rejected. Rationale: each value is indexed separately with its own byte offsets.
  • Single-value JSONPath resolving to a JSON array or object → accepted, highlighting skipped, original loaded value returned, no error.
  • HASH unchanged; RETURN not required.

Version identifiers — confidence LOW, and NEW since the last park. The pages did not assert version numbers at park time; they now assert five, none of which can be checked against a tag because nothing has shipped. Tick each off individually:

  • V1. v8.4.14 for the 8.4 line — disputed. oshadmi's review comment (2026-08-30) said 8.4.13; Jira's fix version changed to 8.4.14 on 2026-08-31, the day after. The pages currently say 8.4.14, following Jira as the system of record. Not confirmed by a human.
  • V2. v8.6.10 for the 8.6 line — from Jira fix versions only.
  • V3. v8.8.1 for the 8.8 line — from Jira fix versions only.
  • V4. v8.10.1 for the 8.10 line — from Jira fix versions only.
  • V5. "Redis Open Source 8.12" and "not available in 8.2 or earlier" — 8.2 exclusion confirmed by oshadmi in review and by #11049 being closed unmerged. This is the best-supported version claim on the page.

Behaviour identifiers — confidence LOW. Transcribed from a diff and a test suite, never from a running engine. Error strings are prose inside QueryError_SetError calls, exactly what gets reworded before release:

  1. HIGHLIGHT/SUMMARIZE on JSON indexes requires RETURN with explicit field namessrc/aggregate/aggregate_request.c, AREQ_ApplyContext, PR #9410 diff; asserted as no_return_error in tests/pytests/test_json.py.
  2. HIGHLIGHT/SUMMARIZE is not supported for JSON fields with multi-value JSONPathsrc/aggregate/aggregate_request.c, AREQ_HasMultiValueHighlightFields, PR #9410 diff; asserted as multi_value_error.
  3. Property `alias` is not in schema — asserted as alias_error in tests/pytests/test_json.py. Pre-existing schema validation, not added by #9410 — if it's absent on unpark, the cause is a different change, not a rename.
  4. Reply body Noise-cancelling <b>Bluetooth</b> headphones, and description left un-highlighted under HIGHLIGHT FIELDS 1 name — output shape from test_highlight_single_value_json. The doc example reuses that fixture's content but its own key (item:1) and index name (itemIdx).
  5. RETURN 0 producing the same error as omitting RETURN — asserted in test_json.py, not separately stated in the C diff.
  6. Multi-value rejection applying regardless of schema field type — from #11106 on master. ▲ Partial evidence gained: the 8.6 backport carries commit b8bf56a87f20f7f307d06aea4247bff103a3e9cc "Validate multi-value JSONPath for all highlighted fields", so follow-up validation is on the release branches. But that commit's subject is about validating all highlighted fields, which is not verbatim #11106's "independent of the schema field type" — so treat this as supporting, not confirming.

Two traps for whoever unparks this:

  • The release-branch commit message is stale about dialects. The squashed #9410 commit on the backport branches says "Reject DIALECT 3+ (can't distinguish scalar-at-path from array-at-path)". That describes an intermediate state; later commits in the same PR ("Restore JSON non-scalar RSValue type", "Expand MOD1544 highlight dialect coverage") changed it, and the final test suite loops for dialect in range(1, MAX_DIALECT + 1) asserting success. The page correctly says nothing about dialects — do not "fix" it to claim DIALECT 3+ is rejected on the strength of that commit message.
  • Trust merged, not closure. The PR list makes #11049 look like a merged 8.2 backport. It is merged: false.

Re-check checklist

Harvested from the branch's /reflect trailers (commit 999fc5008), plus review outcomes and predicted-to-change items. Two items from the previous manifest are now done and dropped: both <!-- TODO(DOC-6994) --> comments are resolved and deleted from the content, and the 8.6-backport half of the old trigger is satisfied.

Highest risk:

  • Settle the 8.4 patch version (V1). oshadmi said 8.4.13 in review; Jira says 8.4.14. The pages say 8.4.14. This question now has no home in the repo — the inline TODO that carried it was deleted — so this checklist item is the only record. Confirm with Omer Shadmi before merge, ideally on thread r3889516184.
  • Re-verify V1–V5 against actual shipped tags, not Jira. Fix versions have already moved once.
  • Re-verify behaviour identifiers 1–6, one verdict each, against a build that has the fix.
  • Finish confirming identifier 6 — read AREQ_HasMultiValueHighlightFields on the shipped 8.4 tag rather than relying on b8bf56a8's subject line.
  • Run the four JSON examples on a real build and replace any transcribed reply that differs. From the Constraint trailer: every FT.SEARCH reply on the Highlighting page came from pytest assertions, not execution.

Also:

  • From the Directive trailer: a SUMMARIZE reply body and the array-skip reply were deliberately omitted — 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.
  • Check whether MOD-17663 shipped in the same release. If so, the projection-alias bullet on highlight.md is stale.
  • Re-sync data/commands_redisearch.json (~1061, ~1112) and data/commands_core.json (~11354, ~11409). They still carry the old blanket "not currently supported" summaries; upstream commands.json was updated in #9410. Deliberately not hand-edited — regenerated at release-docs time, so an edit now would be silently superseded.
  • Confirm the bannerText substitution still reads correctly. /park Step 4 normally wants a page-level bannerText; it was deliberately not added, because it banners the entire page and would misdescribe ~900 lines of GA content on ft.search.md. The section-level version statement is the guard instead. Not an oversight.
  • From the Gaps trailer: tmp/RediSearch was last fetched 2026-07-30 and its master predates and contradicts this fix. Do not use it to verify — re-fetch, or read upstream via gh.
  • Re-run hugo and confirm the cross-links still resolve (#json-indexes on highlight.md, linked from indexing/_index.md ×2, ft.search.md ×2, and administration/overview.md).

On unpark, then

When the trigger fires, run /unpark 3858. It reconciles the docs against the now-settled source and takes the PR through the normal /reflect/finalize pipeline to merge. /finalize is deferred until then — squashing now would discard the episodic trailers this manifest was built from. The do not merge yet guard holds until /finalize completes.

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>
@dwdougherty dwdougherty added do not merge yet parked PR speculatively added based on pre-release info. Check validity when release goes ahead. labels Aug 25, 2026
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

DOC-6994

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 7 related items from repository history:

Memory updated at 6e50845

@dwdougherty
dwdougherty requested review from a team and oshadmi August 25, 2026 15:35

@andy-stark-redis andy-stark-redis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Couple of minor comments but otherwise LGTM.

Comment thread content/develop/ai/search-and-query/advanced-concepts/highlight.md Outdated
Comment thread content/develop/ai/search-and-query/indexing/_index.md
…t.md

Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com>
@dwdougherty

Copy link
Copy Markdown
Collaborator Author

Thank you for the review, @andy-stark-redis!

Comment thread content/commands/ft.search.md Outdated
Comment thread content/commands/ft.search.md Outdated
Comment thread content/develop/ai/search-and-query/advanced-concepts/highlight.md Outdated
Comment thread content/develop/ai/search-and-query/advanced-concepts/highlight.md Outdated
@dwdougherty dwdougherty self-assigned this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge yet parked PR speculatively added based on pre-release info. Check validity when release goes ahead.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants