We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.
All documentation
  • API Reference for older versions
  • AggregationsObject

    This object allows specifying available aggregation functions for all fields of a certain type.

    Properties

    aggregations: {
      date: string[],
      number: string[],
      string: string[],
      time: string[]
    }
    Property/TypeDescription
    date
    String[]
    optional Available aggregation functions for the "date string" field type.
    number
    String[]
    optional Available aggregation functions for the "number" field type.
    string
    String[]
    optional Available aggregation functions for the "string" field type.
    time
    String[]
    optional Available aggregation functions for the "time" field type.

    Example

    Here is an example of defining available aggregations for fields of a certain type:

    dataSource: {
      filename: "data.json",
      mapping: {
        aggregations: {  
          number: [ "sum", "average" ],
          date: [ "max", "min" ],
          string: [ "count", "distinctcount" ]
        },
        // Other mapping configs
      }
    }
    Live example

    See also

    Mapping guide
    MappingObject
    FieldMappingObject