Skip to content

Add support for FT.SEARCH and FT.AGGREGATE #292

@kefahi

Description

@kefahi

Is your enhancement related to a problem? Please describe.

RediSearch is a major source of information. In the current grafana plugin we only see support for FT.INFO which provides some statistics about the redisearch index. But the user is unable to extract actual data from the redisearch index and use it in grafana. this is a major limitation.

Describe the solution you'd like

Add two more options to Grafana redis under redisearch: FT.SEARCH and FT.AGGREGATE. Where the result of those calls will simply be formatted as a simple json to be then processed by grafana. e.g. FT.SEARCH retuns document id and body; the result can be rendered as [{id: doc_id, body: doc_body}, ...].
Similar approach can be used with FT.AGGREGATE as well; but the keys and their values can be constructed dynamically from the response provided by redis.

I inspected the PR that added FT.INFO support ...

We need to extend the code in this file : pkg/redis-search.go
And introduce the description for the new redisearch commands in those files : pkg/query.go and src/redis/command.ts

Describe alternatives you've considered

I tried running redis commnand line to achieve the goal, but due to how redis returns the data (a single sequential array for name,value,name,value,name,value) it is not possible -as per my understanding- to format the results in a way that can be further consumed by a grafana transformer.

Metadata

Metadata

Assignees

No one assigned

    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