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.
|Type||What it does|
|Text||Gets all the different text frequencies|
|Numeric||Gets the min, max, sum and average.|
|Date||Gets all the different frequencies across either |
|Boolean||Gets the frequency of both |
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
To customize your facets further, go to the next section Aggregations.
Updated 5 months ago