-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executing full-text queries by using Redis template #2908
Comments
Hi @mp911de Your assistance is needed :) |
There's no need to ping individual contributors and create further distraction. We see incoming tickets and once we have time, we will get to these. |
Spring Data can run arbitrary commands against Redis; however, because Spring Data isn't aware of the command response structure, it can only pass on results from the driver in their raw form. For Lettuce, you can implement your own |
Same problem +1 |
Hi,
Context:
I have a Spring Boot 3.2.3 app which uses spring-boot-starter-data-redis. We have a Redis cluster on the cloud, where RediSearch module is installed and where other applications are doing inserts of hash records. My application will only be executing search queries and have read-only permission towards cluster. So index already exist and I need to find a way to use it within my full-text queries but relaying on spring-boot-starter-data-redis since redis-om-spring has currently few issues which are blocking usage of pre-created index (#437, #438 & #439).
So pre-created index is created like this:
"FT.CREATE" "company:idx" "ON" "HASH" "PREFIX" "1" "session:" "SCHEMA" "User-Name" "TAG" "SEPARATOR" "|" "Event-Timestamp" "NUMERIC" "SORTABLE"
Defining a template:
Using it:
If I were to execute above query in redis-cli, the output would be:
But in code I get a List with bytes, which I don't like and there could be potential performance issues when doing (de)serialization. The problem with
connection.execute
is that returns byte[]Question 1:
Is there a more optimal way to do issue these types of queries?
Question 2:
Is there a way to configure Redis template so when it issues these types of queries to return a list of entities instead of raw bytes?
The text was updated successfully, but these errors were encountered: