khonsulabs / bonsaidb

A developer-friendly document database that grows with you, written in Rust
https://bonsaidb.io/
Apache License 2.0
1.02k stars 37 forks source link

Add ability to retrieve associated documents through reduce_grouped #170

Open ecton opened 2 years ago

ecton commented 2 years ago

We should be able to reduce a view, grouping by the keys, and retrieve a list of documents that contributed to that reduced value.

After today's refactoring (af62a03e9582b46376879415ffc4b00358733b04), I'm pretty sure we can add two new ways to query views:

We should add examples to the Collection docs, the view-examples example, and if #168 is completed, add an example there too.

Suggested by @colelawrence in Discord