Viewing search aggregations
Aggregations list the total count of search results meeting a certain criterion. For example, you may want to know how many results of a query are in a certain language; aggregations will provide this data as part of the results.
You can review our reference documentation for the Aggregations type to see all aggregations provided by TIMDEX. In the example below, we will use the source
aggregation to see how records matching the search term “modal jazz” are distributed across sources.
{
search(searchterm: "modal jazz") {
records {
source
sourceLink
title
}
aggregations {
source {
docCount
key
}
}
}
}
Run this query in the GraphQL playground.
Note that all aggregations are multivalue fields that require the docCount
and key
subfields.