_count map reduce


#1

Hello.

I’m trying to follow the devloper’s guide. I can’t understand why map reduce “brewery_beers” ptint out “null” as key.

Thank you


#2

Hi there,

So, the reason the keys are being printed as “null”, is because the view needs to have the Reduce applied, and the Grouping set, so it can do as the view intends, and group breweries into Countries, and count how many there are in each. - Let me explain:

If you are referring to the ‘Brewery: By_Country’ view, and trying to view results in your admin console, I think I see your issue.

If this is the case, then you must set ‘Reduce => true’, ‘Group => true’ and ‘Group_Level => 1’.

If, as I imagine, you are accessing this in the Admin UI, you do this by clicking on the grey arrow labeled ‘Filter Results’. Once you click on this arrow, you will get a pop-over displaying multiple filters you can apply to the view.

I have uploaded a screenshot demonstrating what I mean, from my own Admin UI view:

http://i.rbin.co/rgTI

I hope this helps!

Robin.


#3

Thank you very much :smiley: