ok. so here's my test
3 docs
{"_id": "a", "label": "gold", "basePoints": 1000, "bonusPoints": 2000}
{"_id": "b", "label": "gold", "basePoints": 10000, "bonusPoints": 20000}
{"_id": "c", "label": "silver", "basePoints": 10000, "bonusPoints": 20000}
Then I took your advice and wrote a javascript (not erlang) view
function(o) {
emit(o.label, o.basePoints);
emit(o.label, o.bonusPoints);
}
then threw in a reduce of
_sum
then I queried my view with group = true where key = label
And I get a response of
{
"rows":[
{"key":"gold","value":33000}
]
}
I desire that value to be split out by base and bonus points.
David Park Software Developer
M 416*.*461*.*2649
*Points *| More together.
Connect with us: Points <http://l.points.com/69s8/> | Twitter
<http://l.points.com/uxlj/> | Blog <http://l.points.com/vu4y/> | LinkedIn
<http://l.points.com/rjs4/> | Careers <http://l.points.com/juqh/>
TSX: PTS <http://l.points.com/sgf7/>; NASDAQ: PCOM
<http://l.points.com/ko1o/>
111 Richmond St W., Suite 700, Toronto, ON, M5H 2G4, Canada
Connect with me: LinkedIn <https://www.linkedin.com/in/butterdave>
On Wed, Jun 13, 2018 at 2:00 PM Aurélien Bénel <[email protected]>
wrote:
>
> > This will reduce both values into one, but I would like to keep these
>
> It won’t since keys are different and « group=true » is equivalent to «
> group_level=exact ».
> Please test it.
>
>
>
> Regards,
>
> Aurélien
>
>
>