query_aggregate: Conduct a query and return the resulting documents

View source: R/query.R

query_aggregateR Documentation

Conduct a query and return the resulting documents

Description

Conduct a query and return the resulting documents

Usage

query_aggregate(
  index,
  axes,
  queries = NULL,
  filters = NULL,
  credentials = NULL
)

Arguments

index

The index to query

axes

The aggregation axes, e.g. list(list(field="publisher", list(field="date", interval="year")))

queries

An optional vector of queries to run (implicit OR)

filters

An optional list of filters, e.g. list(publisher='A', date=list(gte='2022-01-01'))

credentials

The credentials to use. If not given, uses last login information

Examples

## Not run: 
query_aggregate("state_of_the_union",
                axes = list(list(field="party", list(field="date", interval="year"))),
                queries = c("war", "peace"),
                filters = list(party = c("Democratic", "Republican"),
                               date = list(gte = "1900-01-01")))

## End(Not run)

ccs-amsterdam/amcat4r documentation built on April 17, 2025, 3:22 a.m.