|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [Unreleased] |
| 9 | + |
| 10 | +### Added |
| 11 | + |
| 12 | +- **Typed Aggregate Result Accessors**: Added strongly-typed accessor methods to `AggregateResult` and `AggregateGroupByResult.Group` for safer and more convenient access to aggregation properties. See [Aggregate Result Accessors documentation](docs/AGGREGATE_RESULT_ACCESSORS.md) for details. |
| 13 | + - Direct accessor methods: `Text()`, `Integer()`, `Number()`, `Boolean()`, `Date()` |
| 14 | + - TryGet methods: `TryGetText()`, `TryGetInteger()`, `TryGetNumber()`, `TryGetBoolean()`, `TryGetDate()`, `TryGet<T>()` |
| 15 | + - Lambda pattern methods: `Property<T>()`, `Match()`, `Match<TResult>()` |
| 16 | + |
| 17 | +- **Typed Aggregate Results**: Added `ToTyped<T>()` extension method to map aggregate results to strongly-typed objects. |
| 18 | + - `AggregateResult<T>` and `AggregateGroupByResult<T>` typed result wrappers |
| 19 | + - Suffix-based value extraction: use property names like `PriceSum`, `RatingMean`, `TitleCount` to extract specific values |
| 20 | + - Full aggregate type mapping: use `Aggregate.Text`, `Aggregate.Number`, etc. for complete access |
| 21 | + - Case-insensitive property name matching |
| 22 | + |
| 23 | +- **MetricsExtractor**: Added `MetricsExtractor.FromType<T>()` to automatically extract `returnMetrics` from a type definition |
| 24 | + - Analyzes property types and suffixes to generate the appropriate `Aggregate.Metric[]` |
| 25 | + - Combines multiple suffixes for the same field into a single metric |
| 26 | + - Works with both full `Aggregate.*` types and suffix-based properties |
| 27 | + |
| 28 | +- **Aggregate Property Analyzer**: Added Roslyn analyzers that validate types used with `ToTyped<T>()` |
| 29 | + - WEAVIATE002: Warns when a primitive property lacks a recognized suffix |
| 30 | + - WEAVIATE003: Warns when a suffix is used with an incompatible type |
0 commit comments