Hi Fabio,
This should work. You can use the _sum builtin as reduce:
"reduce":"_sum"
You then need to query your view with the proper group level and a
startkey and endkey:
GET
db/_design/power/_view/watt?group_level=2&startkey=[2011,3]&endkey=[2011,4]&inclusive_end=false
That gives you t
sting FWIW. Didn't know that was
possible... Does that let you specify startkey/endkey instead of key?
On Apr 8, 2011, at 11:27 AM, David Hardtke wrote:
You can send multiple keys to the view if you use POST:
POST /db/_design/ddoc/_view/name?reduce=true/false -d
'{"queries&
You can send multiple keys to the view if you use POST:
POST /db/_design/ddoc/_view/name?reduce=true/false -d
'{"queries":[{"key":"NY"},{"key","CA"}]}'
You'll still need to remove duplicates and merge the two views for the
two keys.
On 04/08/11 04:39, Daniel ItaboraĆ wrote:
I would love t
Hi All,
If we're discussing a native CouchDB full text search, I'd like to point
out a few things about Cloudant's implementation that might guide the
design. Our search indexing strategy is discussed here:
http://support.cloudant.com/kb/search/search-indexing
What we've opted to do is borr
No. For logical queries you need a search add-on:
couchdb-lucene: http://github.com/rnewson/couchdb-lucene
ElasticSearch: http://www.elasticsearch.com/
Cloudant Search (hosted):
http://blog.cloudant.com/developer-preview-cloudant-search-for-couchdb/
On 03/23/11 15:56, Andrew Stuart (SuperCod
You don't need a view for this. You can use the bulk document API to
fetch multiple documents with a single request:
http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API
On 02/24/11 05:26, Justin Walgran wrote:
You definitely want to POST the keys to the view. Looping over the
entire view
Hi Fabio,
I'm assuming the your "value" is the document that you want to
retrieve. There is no need to include the document in the view result
directly. Your value can be null. When you retrieve the view you can
add include_docs=true to the query and it will append the document to
your res
The format won't be exact, but you could use an array for a key:
map:
function(doc) {
for (var i = doc.arrayData) {
emit([doc.idToRetrieveBy, doc.arrayData[i]], null)
}
}
reduce:
_count (i.e. the builtin)
you can then run the following query for idToRetrieveBy=1
GET
/dbname/_