You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I'm new to Redis. I'm using Redis OM and I'm experiencing an interesting issue. I created a model based off of the JSON response from a web service. It loads data correctly. However, when I call find and pass some criteria, it seems to swap the order of parts of the query randomly. For example, I can call the .find() code and 3 times out of 5 it won't return any results because it forms the query incorrectly. Here is an example from the profiler: Incorrect:
"FT.SEARCH" ":Models.vulnerability.Vulnerabilities:index" "@cve_metrics_cvssMetricV31_cvssData_baseSeverity:{critical}" "LIMIT" "0" "1000"
notice how cvssMetricV31 and metrics are swapped. It's almost as if there's some instantiation issue happening when the models classes are being instantiated.
Update:
I stepped into the resolve_redisearch_query function and it seems like the Parents property is out of order. Is there a way to control the order in which the classes are instantiated? I'm currently doing Vulnerabilities.cve.metrics.cvssMetricV31.cvssData.baseSeverity == 'critical' as my query. I would have thought that would retain the order of the objects, but it seems to randomly move around the order of the Parents
The text was updated successfully, but these errors were encountered:
Hi there, I'm new to Redis. I'm using Redis OM and I'm experiencing an interesting issue. I created a model based off of the JSON response from a web service. It loads data correctly. However, when I call find and pass some criteria, it seems to swap the order of parts of the query randomly. For example, I can call the .find() code and 3 times out of 5 it won't return any results because it forms the query incorrectly. Here is an example from the profiler: Incorrect:
"FT.SEARCH" ":Models.vulnerability.Vulnerabilities:index" "@cve_cvssMetricV31_metrics_cvssData_baseSeverity:{critical}" "LIMIT" "0" "1000"
Correct:
"FT.SEARCH" ":Models.vulnerability.Vulnerabilities:index" "@cve_metrics_cvssMetricV31_cvssData_baseSeverity:{critical}" "LIMIT" "0" "1000"
notice how cvssMetricV31 and metrics are swapped. It's almost as if there's some instantiation issue happening when the models classes are being instantiated.
Update:
I stepped into the resolve_redisearch_query function and it seems like the Parents property is out of order. Is there a way to control the order in which the classes are instantiated? I'm currently doing Vulnerabilities.cve.metrics.cvssMetricV31.cvssData.baseSeverity == 'critical' as my query. I would have thought that would retain the order of the objects, but it seems to randomly move around the order of the Parents
The text was updated successfully, but these errors were encountered: