Learn how to index documents with chronological data, and how to sort and filter search results based on time.
"2025-01-13"
.
As an example, consider a database of video games. In this dataset, the release year is formatted as a timestamp:
games
index:
filterableAttributes
:
filterableAttributes
, you can filter search results by date. The following query only returns games released between 2018 and 2022:
sortableAttributes
:
sortableAttributes
, you can sort your search results based on their timestamp. The following query returns all games sorted from most recent to oldest: