Skip to content

fix: display WITHSUFFIXTRIE for RediSearch text fields#6231

Open
trippyogi wants to merge 3 commits into
redis:mainfrom
trippyogi:fix/6087-withsuffixtrie
Open

fix: display WITHSUFFIXTRIE for RediSearch text fields#6231
trippyogi wants to merge 3 commits into
redis:mainfrom
trippyogi:fix/6087-withsuffixtrie

Conversation

@trippyogi

@trippyogi trippyogi commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • Treat WITHSUFFIXTRIE (and related valueless flags) as boolean attributes when parsing FT.INFO, so Workbench no longer shows an empty column.
  • Persist and expose the flag through the RediSearch index-info API DTO.
  • Surface WITHSUFFIXTRIE in the Search index details schema table with check/cancel icons (React does not render raw booleans).

Fixes #6087

Test plan

  • Unit: IndexInfo / useIndexInfo / context.util specs passed
  • API: POST /databases/0/redisearch/info returns WITHSUFFIXTRIE: true for chunkText_trie
  • Local Bugbot: fixed blank boolean cell rendering
  • Workbench: FT.INFO idx:trie shows check for WITHSUFFIXTRIE on chunkText_trie
  • Search index details: WITHSUFFIXTRIE column shows check on enabled field

Note

Medium Risk
Centralized FT.INFO attribute parsing affects Workbench, API, AI context, and Search index UI; incorrect parsing could misrepresent index schema, though scope is display/metadata rather than data writes.

Overview
Fixes blank or wrong RediSearch index flags (notably WITHSUFFIXTRIE) by changing how FT.INFO attribute arrays are parsed: valueless flags are recognized only as standalone tokens in key position, not via array.includes(), so an attribute alias literally named WITHSUFFIXTRIE no longer enables the flag by mistake.

Shared parsing: convertIndexInfoAttributeReply / convertArrayReplyToObject live in redisIndexInfo.ts (with WITHSUFFIXTRIE, INDEXEMPTY, INDEXMISSING added to the flag set); AI query context re-exports them so Browser and AI stay aligned. The index-info API DTO exposes the new boolean fields.

UI: Workbench parseInfoRawResponse uses the same sequential expandBooleanAttributeFlags logic. Vector Search index details add a WITHSUFFIXTRIE column (check/cancel icons) wired from API → useIndexInfo → table. Tests cover alias-vs-flag edge cases on API and UI parsers.

Reviewed by Cursor Bugbot for commit e64bd1a. Bugbot is set up for automated code reviews on this repo. Configure here.

Parse and surface the WITHSUFFIXTRIE boolean flag in Workbench FT.INFO results and Search index details so Redis Insight matches FT.INFO.

Fixes redis#6087
Boolean table cells were blank because React does not render true/false
as text. Match Workbench FT.INFO boolean columns with check/cancel icons.
@trippyogi
trippyogi marked this pull request as ready for review July 17, 2026 20:50
@trippyogi
trippyogi requested a review from a team as a code owner July 17, 2026 20:50

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b1e9ccb46

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +36 to +39
attribute['WITHSUFFIXTRIE'] =
input.includes('WITHSUFFIXTRIE') || undefined;
attribute['INDEXEMPTY'] = input.includes('INDEXEMPTY') || undefined;
attribute['INDEXMISSING'] = input.includes('INDEXMISSING') || undefined;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid matching option names inside field identifiers

When a schema field or alias is literally WITHSUFFIXTRIE (for example a HASH field named that, or a JSON field using AS WITHSUFFIXTRIE) but the option was not enabled, input.includes('WITHSUFFIXTRIE') still marks the returned attribute as having suffix trie enabled because it scans both keys and values from the FT.INFO attribute array. That makes the API/UI report a checkmark for a configuration the index does not have; the same false positive applies to the newly added INDEXEMPTY/INDEXMISSING checks, so the parser needs to distinguish standalone option tokens from identifier/attribute values.

Useful? React with 👍 / 👎.

Avoid includes()-style matches that false-positive when a field alias is
literally named WITHSUFFIXTRIE (or NOSTEM/SORTABLE/etc). Align Workbench,
Browser API, and AI context parsers on the same key-position walk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Redis Insight does not display WITHSUFFIXTRIE for Redis Search text fields

1 participant