Sitelet https://github.com/redis/node-redis/issues/2247
Skip to content

RediSearch result #2247

Description

@akelmj

Hi,

I use this code to search products:

let products = await redisClient.ft.search(index_name , '@brand:(lg)' , {RETURN: ['$.product_type' , 'priority'] , LIMIT:{from: 0 , size:5}});

The result is:

image

How te get the result without id AND value , something like this result:

image

i use this code to get the result:

products.documents = products.documents.map(x=> { return { "priority" : x.value['priority'] , "product_type" : x.value['$.product_type'] }});
can i get the same result using redisSearch without using extra jsavascript code like i use above?

thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EvaluatingThis ticket is still taken into consideration without a clear path forward.Questionfeaturestale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions