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.