redis-om-python icon indicating copy to clipboard operation
redis-om-python copied to clipboard

EmbeddedJson fields are not able to be sorted on, even with the `sortable=True` flag

Open sav-norem opened this issue 1 year ago • 0 comments

Trying to do something like

result_set = Book.find( (Book.metrics.score < 3) ).sort_by("metrics.score")

will result in the error that metrics.score is not part of the model even though the find portion works as expected. Since the sort_by function requires a string to look for the - for sort order, I haven't found a way around this. Model can be found here - taken from RU 204 on JSON with OM - @simonprickett anything to add?

sav-norem avatar Dec 09 '22 15:12 sav-norem