Not possible and likely won't be for years. It'd require an entirely different view engine.
If that one view has caused your view indexing times to skyrocket, I can only assume that you have lots of items per order. You might want to try doing some pre-emit reductions in the map function to reduce the number of total rows in the view. HTH, Paul Davis On Oct 6, 2010, at 10:10 PM, Nick Poulden <[email protected]> wrote: > Hi, > > Is it possible to *only* store the reduce value of a view? > > I'm storing a large database of orders for my online takeaway ordering > website and collating stats, specifically the number of times a particular > dish has been ordered. The view looks something like this: > > // Map > function(doc) { > if(doc.restaurant_id && doc.order_items) { > for(var i=0; i< doc.order_items.length; i++) { > emit([doc.restaurant_id, doc.order_items[i].title], 1) > } > } > } > > // Reduce > function(keys, values, rereduce) { > return sum(values); > } > > The problem is that there are tons of documents in the view index that > aren't much use and view indexing is taking about 10 times longer since I > added this function. The only thing I want to store is the reduce value. Is > that possible, or is it a feature that may be added at some point in the > future? > > Thanks, > > Nick Poulden > http://www.e-resistible.co.uk
