Closed liderman closed 5 years ago
Tested on version v1.10.0. Problem solved. Thank.
usage by one field:
iterator := db.Query("items").Aggregate("name", reindexer.AggMax).Exec()
aggRes := iterator.AggResults()[0]
fmt.Printf("fieldName: `%s` -> value: `%f`", aggRes.Name, aggRes.Value)
usage by two field:
iterator := db.Query("items").Aggregate("field1", reindexer.AggMax).Aggregate("field2", reindexer.AggMin).Exec()
for _, aggRes := range iterator.AggResults() {
fmt.Printf("fieldName: `%s` -> value: `%f`", aggRes.Name, aggRes.Value)
}
Hi, This issue - the result of the dialogue in Telegram chat: https://t.me/reindexer/43
Query example:
Result example:
Problem: Aggregation on the right table is calculated, but the application is not given