Repository navigation
DOC-6994 Document JSON HIGHLIGHT/SUMMARIZE support and limitations - #3858
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) <[email protected]>
🧠 Redis MemoryFound 9 related items from repository history (2 new this commit):
Memory updated at deea790 |
andy-stark-redis
left a comment
There was a problem hiding this comment.
Couple of minor comments but otherwise LGTM.
…t.md Co-authored-by: andy-stark-redis <[email protected]>
|
Thank you for the review, @andy-stark-redis! |
Unpark reconciliation for the JSON HIGHLIGHT/SUMMARIZE pages, folded into the merge of main. The conflicts in ft.search.md and indexing/_index.md were link-syntax only on main's side; the branch content was kept and every relref and note shortcode it added was converted to render-hook links and a NOTE blockquote. Predicted vs actual. The park snapshot got the behaviour right: all six behaviour identifiers match verbatim in the source at RediSearch v8.12.1, v8.10.1, and v8.4.13, and every example ran as documented on Redis 8.12.0 and 8.10.3. It got the versions wrong. v8.6.10 and v8.8.1 came from Jira fix versions and never shipped as tags. v8.10.1 is a RediSearch module version, and Redis Open Source 8.10.1 bundles RediSearch v8.10.0, which still rejects every JSON highlight; the fix reaches Redis users in 8.10.2 and 8.12.0. The pages now state Redis Open Source versions only. Running a real build also turned up two corrections. Error replies carry a SEARCH_QUERY_BAD code prefix that the transcribed examples lacked. And the multi-value check skips fields that appear only in RETURN when FIELDS names specific fields, so the old "any field in the returned set" wording overstated the rule. Learned: park snapshot was right on behaviour, wrong on versions; Jira fix versions and module tags are not Redis OS releases Constraint: version statements on these pages name Redis Open Source releases, never RediSearch module versions Rejected: keeping v8.4.14, v8.6.10, v8.8.1 | no public tag exists for them and no Redis OS release on those lines bundles the fix Directive: widen "8.10.2 or later" only when a released redis/redis 8.4, 8.6, or 8.8 tag pins a RediSearch ref containing the fix in modules/modules.yaml Recheck: when Redis Open Source 8.4.x, 8.6.x, or 8.8.x bundles a RediSearch containing d526e7e, 25d7b56, or fe67f90 respectively Gaps: Redis 8.10.2 verified by module pin only, not run; SUMMARIZE and array-skip replies were observed on a real build but deliberately not added Ticket: DOC-6994 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Documents JSON
HIGHLIGHT/SUMMARIZEbehaviour after MOD-16530 relaxes the engine's blanket rejection.The canonical rules 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. Two rules were never documented anywhere: JSON requires an explicitRETURN, and a single-value JSONPath resolving to an array or object is accepted but returned unhighlighted.Versions
The pages state Redis Open Source 8.10.2 or later, the first releases that bundle the fix (8.10.2 and 8.12.0 bundle RediSearch v8.10.1 and v8.12.1). No released Redis Open Source 8.4.x, 8.6.x, or 8.8.x bundles it yet, so those lines aren't mentioned. Widen the statement once one does.
Verification
Every example on the Highlighting page was run on Redis 8.12.0 and 8.10.3, and Redis 8.10.1 was confirmed to still reject JSON highlighting. Behaviour identifiers were checked in the RediSearch source at v8.12.1, v8.10.1, and v8.4.13.
🤖 Generated with Claude Code