-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Milestone
Description
Hi,
I got this NPE every time I started my application using spring-ai-redis.
java.lang.NullPointerException: Cannot invoke "org.springframework.ai.vectorstore.filter.converter.FilterExpressionConverter.convertExpression(org.springframework.ai.vectorstore.filter.Filter$Expression)" because "this.filterExpressionConverter" is null
at org.springframework.ai.vectorstore.RedisVectorStore.nativeExpressionFilter(RedisVectorStore.java:394) ~[spring-ai-redis-0.8.0-20240114.220504-53.jar:0.8.0-SNAPSHOT]
It seems that the filterExpressionConverter
is not initialized once the index has been created in Redis. The only place, where this field is set, is inside the method afterPropertiesSet()
along with the check if index exists & its creation. This is not a necessity to have the index creation and intialization of the filterExpressionConverter
field.
I purpose that the initialization to be done before the check of index existence. Thank you.
Cheers,
Bram