I am using Elastic cache and redis in my project. I have the cache where key is String and Employee object as value. Employee class is as below. Is there any way to query redis such that it returns employee whose startrange and endrange fulfill the criteria : startrange<input<endrange. Where input will be passed to the query.
Employee
int startRange;
int endRange;
Redis Entries
1 Employee{startRange=12300 ,endRange=12399 }
2 Employee{startRange=45600 ,endRange=45699 }
3 Employee{startRange=78900 ,endRange=78999 }
Input: 12345
Output
1 Employee{startRange=12300 ,endRange=12399 }