Kazoo 3076: Add the descendants_count to the search results on accounts view

this view is wrong.

please base your work on this.

{
   "search_by_name": {
       "map": "function(doc) { if (doc.pvt_deleted) return; for (i in
doc.pvt_tree) { emit([doc.pvt_tree[i], doc.pvt_type, doc.name], {'id':
doc._id, 'name': doc.name, 'realm' : doc.realm}); } }"
   }
}



On Tue, Dec 2, 2014 at 11:38 PM, James Aimonetti <notifications@github.com>
wrote:

> In applications/crossbar/priv/couchdb/account/search.json:
>
> > @@ -3,7 +3,7 @@
> >      ,"language":"javascript"
> >      ,"views": {
> >         "search_by_name": {
> > -           "map": "function(doc) { if (doc.pvt_deleted) return; { emit([doc.pvt_type, doc.name ? doc.name : doc._id], {'id': doc._id, 'name': doc.name ? doc.name : doc._id}); } }"
> > +           "map": "function(doc) { if (doc.pvt_deleted) return; { emit([doc.pvt_type, doc.name ? doc.name : doc._id], {'id': doc._id, 'descendants_count': doc.descendants_count, 'name': doc.name ? doc.name : doc._id}); } }"
>
> Does this work when not searching for accounts?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/2600hz/kazoo/pull/641/files#r21201909>.
>