How to get total rows from view with key?



In View Query, can get total rows of this View by ‘meta’.‘total_rows’.
But in the case i want to get total rows with any key, what is attribute for this value?



Every non-reduce view query through the SDK will expose the total rows. Which SDK are you using?


Hi @daschl, I am using Nodejs.


@brett19 can you share an example of how to get the total rows in node? I checked but we might need to add this there too.


Hi @daschl,
And another question, can Couchbase View descend by value? I check it only descend by key.
Thank you.


@Sonrobby no it is not possible to sort by value at all with views. For that you need N1QL.