Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Aggregation Stage will generate the engine specific aggregations based on the configuration provided, specifically with the list of DynamicAgg in the aggs configuration parameter, and store them in the intermediate under the stage name.

Additionally, this stage can also generate the filters from the selected aggregations, which will look in the key aggs in the intermediate dictionary in the process function, the generated filters will be stored in the intermediate under the name provided in  filters_name



PropertyDescriptionDefaultTypeRequired
aggsAggregations to be performed within this stage[]array of DynamicAggNo
typeStage class name-stringYes (but only while working with the JSON Format)
enableEnable stage for executiontruebooleanNo
nameName of the key in which the aggregations will be stored in intermediate"aggregations"stringNo
save_to_intermediateIf true, the result of the stage will be stored in the intermediate instead of the final sectionfalsebooleanNo
expand_resultIndicates if the result of this stage should be expanded into the final data dictionary instead of being appended as usualfalsebooleanNo
ui_onlySection specific for UI configuration. This configuration will be retrieved when necessary and should affect the process of the stageobjectNo
halt_on_exceptionIndicates if, in case of an exception, the pipeline should be interruptedfalsebooleanNo
filters_nameName of the key in which the aggregation filters will be stored in intermediate. Generated from a list of SelectionAgg stored in the aggs parameter in intermediate"aggregation_filters"stringNo
engine_nameName of the engine to use for this query. If none is provided, the default engine will be usedstringNo
search_responseName of the key in the final result where the query results will be stored"search"stringNo
ui_aggregationsDetermines if UI aggregations are enabledtruebooleanNo

Selected Aggregations

The Aggregation stage can process selected aggregations, these required to be of type SelectionAgg, or a JSON representation of it.

Code Block
languagejs
titleExample of selected aggregations
{
  "aggs": [
    {
      "id": "genres",
      "values": [
        "Drama"
      ],
      "negated": [],
      "level": 0
    },
    {
      "id": "adult",
      "values": [
        false
      ],
      "negated": [],
      "level": 0
    }
  ]
}