incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hank Knight <hknight...@gmail.com>
Subject CouchDB: Display 3 rows with the highest value
Date Tue, 30 Jul 2013 15:49:07 GMT
This returns 3 rows:
https://zurv3aqzm.iriscouch.com/fruit/_design/zzz6/_view/zzz6?limit=3&group=true

I want to display the 3 rows with the highest value, not any arbitrary 3 rows.

Here is my code:

/// Map Function ///
function(doc) {
  if (doc.fruit) emit(doc.fruit, null);
}

/// Reduce Function ///
_count

/// Grouping: True ///

Mime
View raw message