FT.SEARCH -> (error) elem.map is not a function

Running redislabs/redismod:latest docker container and redis-cli.

Steps to reproduce:

> FT.CREATE myIdx on JSON PREFIX 1 entity: SCHEMA $.position.y AS y NUMERIC $.position.x AS x NUMERIC $.name AS name TEXT
> JSON.SET entity:1 $ '{"id":"entityA","name":"EntityAlpha","longName":"This is entity alpha","speed":9.66,"ownerId":"god","position":{"x":15,"y":15},"color":"red"}'
> JSON.SET entity:2 $ '{"id":"entityB","name":"EntityBeta","longName":"This is entity beta","speed":9.66,"ownerId":"god","position":{"x":20,"y":20},"color":"red"}'
> JSON.SET entity:3 $ '{"id":"entityC","name":"EntityCeta","longName":"This is entity ceta","speed":9.66,"ownerId":"god","position":{"x":15,"y":25},"color":"fire"}'
> FT.SEARCH myIdx "@name:(Entity*)"
(error) elem.map is not a function
> FT.SEARCH myIdx "@x:[0 200]"
(error) elem.map is not a function
> FT.SEARCH myIdx "@name:(EntityAlpha)"
(error) elem.map is not a function

Surprisingly, google returns very few results for this error message.

Here is the output of ‘info modules’:

# Modules
module:name=ReJSON,ver=20011,api=1,filters=0,usedby=[search|graph],using=[],options=[handle-io-errors]
module:name=bf,ver=20209,api=1,filters=0,usedby=[],using=[],options=[]
module:name=timeseries,ver=10616,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors]
module:name=graph,ver=20815,api=1,filters=0,usedby=[],using=[ReJSON],options=[]
module:name=rg,ver=10204,api=1,filters=1,usedby=[rg],using=[rg],options=[]
module:name=ai,ver=10205,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors]
module:name=search,ver=999999,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors]

# rg
rg_nexecutions:0
rg_nregistrations:0

# rg_regisrations

# rg_plugins
rg_GearsPythonPlugin:version=10000

# rg_python_stats
rg_TotalAllocated:23747248
rg_PeakAllocated:8294664
rg_CurrAllocated:8202152

# rg_python_requirements

# rg_python_sessions

# ai_versions
ai_RedisAI_version:1.2.5
ai_low_level_API_version:1
ai_rdb_version:4

# ai_git
ai_git_sha:746b199e69f272d12aab00c26d31c8e35eb48b29

# ai_load_time_configs
ai_threads_per_queue:1
ai_inter_op_parallelism:0
ai_intra_op_parallelism:0
ai_model_execution_timeout:5000
ai_backend_memory_limit:0

# ai_backends_info

# ai_cpu
ai_self_used_cpu_sys:41.196046
ai_self_used_cpu_user:18.931965
ai_children_used_cpu_sys:0.000000
ai_children_used_cpu_user:0.000000
ai_main_thread_used_cpu_sys:2.196046
ai_main_thread_used_cpu_user:3.931965
ai_queue_CPU_bthread_n1_used_cpu_total:54.771135

I’m basically trying to follow this pattern here for creating, indexing, and searching documents: Index and search JSON documents | Redis

Please help

How are you running the server?
Are you running on Mac?
How did you install redis-cli?

Can you please try to run the same sequence from python or any other language? Or you can use RedisInsight

It seems like you’re using the redis-cli written in JS, you should open an issue here:

Meanwhile, I suggest you install the official redis-cli from Download | Redis

Thank you! I’ll do that