vseloved / cl-redis

Redis client for Common Lisp
Other
188 stars 38 forks source link

def-cmd for FT.SEARCH and multiple arguments? #40

Open Odddity opened 2 months ago

Odddity commented 2 months ago

I'm not having any luck with this:

(redis:def-cmd FT.SEARCH (index &rest params) :multi: 
  "Search query")

Because this query works:

(ft.search "gobs" "@x:[-3300 3300] @y:[-3300 3300]")

But this one does not. It yields a list (0) instead of results from the database.

(ft.search "gobs" "@x:[-3300 3300] @y:[-3300 3300] LIMIT 0 100")

Do I need to write the DEF-CMD differently, or provide a defmethod tell for FT.SEARCH? I don't really know how to get the desired data (the command works in REDIS-CLI so I know the command isn't wrong)