Skip to content

[FEATURE] FT.INFO returned information are not aligned with returned result of RedisSearch #270

@hwware

Description

@hwware

Some of our clients could call API from Mem0 library (https://github.com/mem0ai). It provides some interfaces with RedisSearch (https://github.com/mem0ai/mem0/blob/main/mem0/vector_stores/redis.py). When I play some commands of the ValkeySearch, I noticed that the information returned by FT.INFO is quite different between RedisSearch and ValkeySearch.
Following, I will list four cases to indicate the difference.

  1. Some fields are missing from the returned information by FT.INFO from ValkeySearch
    Test script:
    FT.CREATE idx1 ON HASH PREFIX 1 blog:post: SCHEMA sku AS sku_tag TAG

Following is part of the returned information from RedisSearch

Image

You can see, the field indexes_all only appear in the returned result of RedisSearch
PR #306 fix this issue

  1. Some fields only appear in the returned information by FT.INFO from ValkeySearch
    Test script:
    FT.CREATE idx1 ON HASH PREFIX 1 blog:post: SCHEMA sku AS sku_tag TAG

Following is part of the returned information from ValkeySearch

Image

You can see, the size, one of the subfields of attributes, and backfill_in_progress etc only appear in the ValkeySearch returned information. This is not a bug, they are extra meta data for ValkeySearch

  1. Some fields appear in the ValkeySearch and RedisSearch, but the format is not matched
    Test script:
    FT.CREATE idx3 SCHEMA my_hash_field_key VECTOR HNSW 10 TYPE FLOAT32 DIM 20 DISTANCE_METRIC COSINE M 4 EF_CONSTRUCTION 100

Following is part of the returned information from RedisSearch

Image

Following is part of the returned information from ValkeySearch

Image

You can notice, for the attribute part, the format of ValkeySearch is different from RedisSearch

PR #312 fix this issue

  1. Some fields appear in the ValkeySearch and RedisSearch, but the value or type is not matched
    Test script:
    JSON.SET doc:1 $ '[{"arr": [1, 2, 3]}, {"val": "hello"}, {"val": "world"}]'
    FT.CREATE idx2 ON JSON PREFIX 1 doc: SCHEMA $..arr AS arr NUMERIC

Following is part of the returned information from RedisSearch
Image

Following is part of the returned information from ValkeySearch

Image

You can see, the fields: num_docs, num_terms, and num_records are different type or value

PR #319 to fix case 4 issue

I think we should at least align with the returned information by FT.INFO from RedisSearch. Later, I will focus on this part and create PRs if there is no argue with this. @PingXie @madolson @yairgott

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions