Thanks for writing this library, it's made made my life a bit easier. I came across some unusual behavior while I was using this library, notably find() does not work on any field with my data model below. It wasn't until I removed the index on the four timedelta and bool fields did find() start to work again. The get() method worked throughout.
find() does not work with this data model:
from typing import Dict, Optional, List, Set
from redis_om import JsonModel, Field
class Example(JsonModel):
id : str = Field(primary_key=True, index=True)
members : List[str] = Field(index=True, default=[])
friends : List[str] = Field(index=True, default=[])
dependencies : List[str] = Field(index=True)
textfieldA : str = Field(index=True)
date_start : date = Field(index=True)
date_end : Optional[date]
textfieldB : str = Field(index=True)
timefieldA : timedelta = Field(index=True)
timefieldB : timedelta = Field(index=True)
boolfieldA : bool = Field(index=True)
boolfieldB : bool = Field(index=True)
last_updated : date = Field(index=True, default=date(1990, 1,1))
find() does work after removing index on timedelta and bool fields. Removing either type doesn't not fix the issue, indices on both types need to be removed in order to find() to work again:
Hi,
Thanks for writing this library, it's made made my life a bit easier. I came across some unusual behavior while I was using this library, notably
find()
does not work on any field with my data model below. It wasn't until I removed the index on the fourtimedelta
andbool
fields didfind()
start to work again. Theget()
method worked throughout.find()
does not work with this data model:find()
does work after removing index ontimedelta
andbool
fields. Removing either type doesn't not fix the issue, indices on both types need to be removed in order tofind()
to work again:Version Information: Python: 3.11.5 redis-om-python: 0.2.1 OS: macOS Sonoma 14.0 (Apple Silicon)