What we could do is, when saying a field is indexable is
by default only "equal"
but another attribute to let define other index (for example "index_types=['equal', 'range']
But maybe not sufficient, we may want to specify a function to transform data before indexing in range: slugify for texts, big endian for numbers, etc. So maybe an "index_range_fn" argument which would accept a function taking the value as input and would return the indexable value.
Could help in a lot of cases
See https://redis.io/topics/indexes
What we could do is, when saying a field is indexable is
But maybe not sufficient, we may want to specify a function to transform data before indexing in range: slugify for texts, big endian for numbers, etc. So maybe an "index_range_fn" argument which would accept a function taking the value as input and would return the indexable value.