RedisSearch. Is it possible to return data requested with RETURN keyword as a regular response?

25 views Asked by At

Is it possible to return data requested with RETURN keyword as a regular response? So, when I run usual query, like

FT.SEARCH :index 'query'

I get response like

  1. "$"
  2. json_document ("{"pk":"1:1:1466","updated_at":"2023-09-22 14:23:29.138198",...}")

When I run query with RETURN

FT.SEARCH :index 'query' RETURN 6 '$.foo' AS 'foo' '$.bar' AS 'bar'

I get

  1. "foo"
  2. "1"
  3. "bar"
  4. "2"

I'd like to get response here as json document '{"foo": "1", "bar": "2"}'. Is it possible?

Why? There is some unpleasant behaviour in Redis-Python-OM lib when I'm trying to insert RETURN into query, because of that response format.
https://github.com/redis/redis-om-python/issues/568

0

There are 0 answers