Query latest documemt

Anyone who has experience with meta filtering in dates?

I want to specially fetch the most recent upserted document, and have not found a way to do so.

I have attempted at adding a timestamp into metadata and query over that metadata value (using search_kwargs and docsearch), but failed to do so.

Can you let us know what you did to add the timestamp to metadata and how it failed (e.g. didn’t return any results, returned results that didn’t match the filter).