incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <kocol...@apache.org>
Subject Re: How Views Work
Date Sat, 08 Aug 2009 17:06:03 GMT
On Aug 7, 2009, at 1:35 PM, Matt King wrote:

> Hi all,
>
> I have question about how views work. I read that when you create a  
> view, CouchDB indexes it so it's faster on the next request. But if  
> I pass in startkey and endkey, does it only index the docs that are  
> returned? Or is the entire list indexed and CouchDB returns the  
> offsets as requested?

Hi Matt, each time a view is queried CouchDB indexes all the documents  
that have changed since the last query and then returns the updated  
result.  Query-string parameters like startkey and endkey don't affect  
this behavior (in fact, if you think about we _can't_ filter the list  
of docs to be indexed based on those parameters, since we don't know a  
priori what keys will be emitted by a map over a given document).

Best, Adam

Mime
View raw message