\dontrun{
## Get the number of archaeological document by journal
hal_query("archéologie") |>
  hal_facet(field = "journalTitle_s", sort = "count", decreasing = TRUE) |>
  hal_search() |>
  as.data.frame()

## Get the number of archaeological documents per year
hal_query("archéologie") |>
  hal_facet(
    sort = "count",
    range = list(
      field = "producedDateY_i",
      start = 2000,
      end = 2020,
      gap = 1
    )
  ) |>
  hal_search() |>
  as.data.frame()

## Multiple facets
hal_query() |>
  hal_facet(
    field = c("authFullName_s", "authIdHal_s"),
    limit = 5
  ) |>
  hal_search() |>
  as.data.frame()
}
