RediSearch / JRediSearch

Java Client for RediSearch
https://redisearch.io
BSD 2-Clause "Simplified" License
141 stars 62 forks source link

redis.clients.jedis.exceptions.JedisDataException: No such property #118

Closed devcken closed 3 years ago

devcken commented 4 years ago

Hi, JRediSearch

I recently played with JRediSearch, and faced with wierd situation.

I'm trying to implement Spring Batch item reader with JRedisSearch. It first create index with some information. Then read chunked(paginated) data from DB, and add them to Redis with Client#addDocuments.

After adding all of data to Redis, it invoke Client#aggregate with groupBy and limit.

Sadly, Redis response with error; redis.clients.jedis.exceptions.JedisDataException: No such property 'ategoryNo'.

Real name of the field is categoryNo.

The following is a result of FT.INFO.

127.0.0.1:6380> FT.INFO myIdx
 1) index_name
 2) myIdx
 3) index_options
 4) (empty array)
 5) fields
 6) 1) 1) id
       2) type
       3) NUMERIC
    2) 1) price
       2) type
       3) NUMERIC
    3) 1) categoryNo
       2) type
       3) NUMERIC
    4) 1) createdDate
       2) type
       3) TEXT
       4) WEIGHT
       5) "1"
gkorland commented 4 years ago

Can you please check the monitor and see that is really sent to Redis?

> redis-cli
> monitor
gkorland commented 4 years ago

@devcken do you still see the issue?

FangfangFu commented 3 years ago

I experienced the same issue on golang. It trims off the first character when it executes the command. @devcken How did you solve the problem?

No such property ccountnumber Monitor: 1625065425.072132 [0 172.17.0.1:54158] "FT.AGGREGATE" "vcas4.0" "@accountnumber:XYNR9kh_uiA3l57N9P813gAC" "FILTER" "@sessiontimestamp <= 1620510668000 && @sessiontimestamp >= 1620510664000" "GROUPBY" "1" "accountnumber" "REDUCE" "SUM" "1" "usdorderamount" "AS" "usdorderamount"

gkorland commented 3 years ago

https://github.com/RediSearch/redisearch-go/issues/117