redis / redis-om-spring

Spring Data Redis extensions for better search, documents models, and more
MIT License
609 stars 94 forks source link

with not being able to retrieve data using @query. #497

Closed w9931125 closed 3 months ago

w9931125 commented 3 months ago

Thank you very much to the development team for providing a more lightweight search solution. However, I've encountered some issues and hope to get some help:

I'm using Java 21, Spring Boot 3.3.0, and redis-om-spring 0.9.4. After extending the RedisDocumentRepository class, I overrode the page method (I didn’t seem to find any examples with conditions applied to the page method). I used the @Query annotation to query with the email as a parameter condition. Additionally, in the UserPageVO, I declared the email field with @Indexed and @Searchable, but it still doesn't return any results. image image image image image

w9931125 commented 3 months ago

I think I've found the issue—it seems to be related to dialect and syntax conversion. The commands executed in Java don't seem to accurately translate into Redis CLI syntax. Additionally, how can I set the syntax and dialect in Java? I couldn't find a way to do this in the annotations. Where can I find the relevant parameter settings and explanations for the fields in the annotations?

bsbodden commented 3 months ago

Glad you figured it out. If you want some suggestions post your code and some sample data. Cheers, bsb