To construct create guides for filters you'll need facets, an overview of a field. Below is a table of what is outputted by facets for different field types.

TypeWhat it does
TextGets all the different text frequencies
NumericGets the min, max, sum and average.
DateGets all the different frequencies across either hourly, daily, monthly, yearly can be set.
BooleanGets the frequency of both true and false.

Grab facets for all available fields:

from relevanceai import Client
client = Client(token=YOUR_ACTIVATION_TOKEN)
ds = client.Dataset("quickstart")

ds.facets()

You can specify which fields to get facets from and paginate it.

ds.facets(["brand"], page=1, page_size=10)

You can change how date facets are handled. Available intervals are hourly, daily, monthly, yearly.

ds.facets(["insert_date_"], date_interval="hourly")

To customize your facets further, go to the next section Aggregations.