[Redis support]Does Redis support operations on secondry index?

Hi, I have been evaluating redis for my use cases like API caching. So i thought of using Redis as cache server. so my requirements are

  1. I want to store additional metadata info with every response object in cache through which i can query the data in redis or delete it.

Example::- I have vehicle info in json format

vehcile payaload

{

vehicleid:123434jhdh

}

Key would be registration no

and other attribute like vehicle colour like red through which i want to query the data or delete not always using primary key

like in MYSQL

select * from vehcile where vehicleColour =“red”;

Delete * from vehicle where vehicleColour =“red”;

Similar thing I would like to achieve in Redis through secondary index

Please let me know if it is possible to achieve. if yes how we can achieve this in redis?

RediSearch can certainly be used as a secondary index. We currently don’t have an API equivalent to DELETE FROM … WHERE, but it is planned for a future version.