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
the code in elasticsearch-py says that the types it translates into isoformat, which is then supported by elasticsearch itself, are datetime.date and datetime.datetime; i.e. no support for datetime.time. And django-elasticsearch-dsl doesn't use the isoformat either. I have a TimeField that needs to be indexed. When I execute search_index --populate it throws an exception "elasticsearch.exceptions.SerializationError: ({'item_reviews': [], 'restaurant': {'name': 'test', 'delivery_price': Decimal('0.00'), 'opens_at': datetime.time(6, 0), 'closes_at': datetime.time(11, 11, 34)}, 'name': 'burger', 'price': Decimal('23.500')}, TypeError("Unable to serialize datetime.time(6, 0) (type: <class 'datetime.time'>)"))
". What should I do?
The text was updated successfully, but these errors were encountered:
safwanrahman
added a commit
to safwanrahman/django-elasticsearch-dsl
that referenced
this issue
Oct 31, 2022
the code in elasticsearch-py says that the types it translates into isoformat, which is then supported by elasticsearch itself, are datetime.date and datetime.datetime; i.e. no support for datetime.time. And django-elasticsearch-dsl doesn't use the isoformat either. I have a TimeField that needs to be indexed. When I execute search_index --populate it throws an exception "elasticsearch.exceptions.SerializationError: ({'item_reviews': [], 'restaurant': {'name': 'test', 'delivery_price': Decimal('0.00'), 'opens_at': datetime.time(6, 0), 'closes_at': datetime.time(11, 11, 34)}, 'name': 'burger', 'price': Decimal('23.500')}, TypeError("Unable to serialize datetime.time(6, 0) (type: <class 'datetime.time'>)"))
". What should I do?
The text was updated successfully, but these errors were encountered: