Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filter on IDs with RediSearch

Is there any way to restrict RediSearch results by a list of document IDs, which would be specified in the request?

e.g. something like FT.SEARCH cars fast @id:{100,200,300} would return only fast cars having ID 100, 200, or 300.

like image 699
mahemoff Avatar asked Oct 21 '25 05:10

mahemoff


1 Answers

Yes, there's the INKEYS keyword.

> FT.SEARCH cars "fast" INKEYS 3 100 200 300

See https://oss.redislabs.com/redisearch/Commands/#ftsearch

like image 65
Not_a_Golfer Avatar answered Oct 25 '25 05:10

Not_a_Golfer