{"record":{"id":"85f91bd4b2424657","repo":"weaviate/weaviate","slug":"unknown-aggregation-type-aggtype-85f91b","errorCode":null,"errorMessage":"unknown aggregation type ${aggType}","messagePattern":"unknown aggregation type (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"adapters/repos/db/aggregator/filtered.go","lineNumber":418,"sourceCode":"\t\t\taggProp.BooleanAggregation = prop.boolAgg.Res()\n\t\t\tout[prop.name.String()] = aggProp\n\t\tcase aggregation.PropertyTypeText:\n\t\t\taggProp.TextAggregation = prop.textAgg.Res()\n\t\t\tout[prop.name.String()] = aggProp\n\t\tcase aggregation.PropertyTypeNumerical:\n\t\t\taddNumericalAggregations(&aggProp, prop.specifiedAggregators,\n\t\t\t\tprop.numericalAgg)\n\t\t\tout[prop.name.String()] = aggProp\n\t\tcase aggregation.PropertyTypeDate:\n\t\t\taddDateAggregations(&aggProp, prop.specifiedAggregators,\n\t\t\t\tprop.dateAgg)\n\t\t\tout[prop.name.String()] = aggProp\n\t\tcase aggregation.PropertyTypeReference:\n\t\t\taddReferenceAggregations(&aggProp, prop.specifiedAggregators,\n\t\t\t\tprop.refAgg)\n\t\t\tout[prop.name.String()] = aggProp\n\t\tdefault:\n\t\t\treturn nil, errors.New(string(\"unknown aggregation type \" + prop.aggType))\n\t\t}\n\t}\n\n\treturn out, nil\n}\n\nfunc (fa *filteredAggregator) prepareAggregatorsForProps() (propAggs, error) {\n\tout := propAggs{}\n\n\tfor _, prop := range fa.params.Properties {\n\t\tpa := propAgg{\n\t\t\tname:                 prop.Name,\n\t\t\tspecifiedAggregators: prop.Aggregators,\n\t\t}\n\n\t\tat, dt, err := fa.aggTypeOfProperty(prop.Name)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"property %s\", prop.Name)","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/repos/db/aggregator/filtered.go#L400-L436","documentation":"This error is raised in filtered_aggregator.results() when converting accumulated property state back into GraphQL output: the property's aggType is not one of the known aggregation.PropertyTypes (text, numeric, boolean, date, reference). Unlike the parse-time variant it fires during result assembly, meaning a property was stored with an unrecognized type and only rejected when producing results.","triggerScenarios":"A property whose aggType was set to something outside the aggregation.PropertyType enum — usually via the same mis-parsed GraphQL aggregation request, or by code constructing aggregation.Parameter programmatically.","commonSituations":"Version skew where one node serializes a property type another node's aggregator doesn't know, custom tooling building aggregation parameters directly, or enum drift after a Weaviate upgrade.","solutions":["Verify the aggregation request uses only supported per-property aggregators (count/mean/sum/min/max/median/mode/topOccurrences etc. as appropriate for the type)","Ensure all cluster nodes run the same Weaviate version","Check that the property's type in the schema supports the requested aggregation (e.g. text vs int)","Capture the failing query and property name and reproduce against a single-node setup"],"exampleFix":"// before\nnumericField { mode } // mode unsupported for numeric type on this version\n// after\nnumericField { mean sum min max median }","handlingStrategy":"validation","validationCode":"// ensure each requested property aggregation matches its schema kind before querying\nconst kind = schema.properties[name].dataType[0] === 'text' ? 'text' : 'numeric'\nif (requestedAggregatorOnlyForOtherKind(kind, agg)) throw new Error(`agg ${agg} invalid for ${kind}`)","typeGuard":"function isKnownPropertyType(t: string): boolean {\n  return [\"text\",\"numeric\",\"boolean\",\"date\",\"reference\"].includes(t)\n}","tryCatchPattern":null,"preventionTips":["Match aggregators to property types (topOccurrences for text, mean/median for numbers)","Keep all cluster nodes on one version","Test aggregation queries after upgrades"],"tags":["graphql","aggregation","weaviate"],"backgroundTag":"unsupported-aggregation-type","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}