Skip to content

Discrepancy in INFO response parsing #3262

Closed
@raz-mon

Description

@raz-mon

Version: 5.0.0

Description: The code for parsing the INFO response is creating a discrepancy in the new RediSearch index field types field, e.g., search_fields_text.
If there is more than one section to this field its corresponding value (e.g., TEXT=1, SORTABLE=1) is returned as a dictionary (as expected), while if there is only one value for it (e.g., TEXT=1) it is returned as a string!

This is bad since we later use this value assuming that it is a dictionary, and thus face failures in the case that it is not.
The wanted behavior: We always get a dictionary back, whether we have only one section for this value or more.

Example: We have one section for the TEXT field, and two for the TAG field, and this is what we get:
image

The source of the problem is in the parse_info() function, here.

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions