this whole function seems oddly trying to be generic while at the same time will fail hard on this call on anything besides something called "site_code" which is sort of the worst of both worlds. would be nice if we could be more explicit, and we should probably either not try to be generic, or be generic in a more generic way (e.g. emit all properties and include the property name in the key so you can query on it, sort of like this https://github.com/dimagi/core-hq/blob/master/corehq/apps/hqcase/_design/views/all_case_properties/map.js)