You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Aníbal Rojas <an...@gmail.com> on 2009/05/21 18:53:35 UTC
Newbie question regarding Bulk Documents
Hello,
Once a POST request to the /whatever/_bulk_docs URI finishes and a
response is generated by CouchDB, does this assure all the views have
been updated? Could not find this behavior expĺained in the API
Thanks in advance,
--
Aníbal Rojas
@anibalrojas
Re: Newbie question regarding Bulk Documents
Posted by Aníbal Rojas <an...@gmail.com>.
Kai,
Thatś what we are doing. We are updating docs matching a specific
view, we loop over this view and each time we process 1000 documents.
Now I understand that each time we query the view, it is updated and
the next set of docs (missing some information) are rerned.
When this bulk update finishes, the documents will be all updated
and the views will be completely updated ready for a quick response
Best regards,
--
Aníbal
2009/5/23 Kai Griffin <ka...@griffinbyteworks.com>:
> I have the part of my application that uploads lots of bulk docs perform a
> view request every x-number of documents (roughly around every 50). That
> spreads the time required to upload the view out, so that when it's time for
> someone to look at a view, the indexes are either already updated, or very
> nearly so.
> Cheers,
> Kai
>
> On 21/05/2009 23:36, Blair Nilsson wrote:
>>
>> 2009/5/22 Aníbal Rojas <an...@gmail.com>:
>>
>>>
>>> Hello,
>>>
>>> Once a POST request to the /whatever/_bulk_docs URI finishes and a
>>> response is generated by CouchDB, does this assure all the views have
>>> been updated? Could not find this behavior expĺained in the API
>>>
>>> Thanks in advance,
>>>
>>> --
>>> Aníbal Rojas
>>> @anibalrojas
>>>
>>>
>>
>> The views will not be updated until someone looks at them. In saying
>> that, you can treat them as updated because next time they are used,
>> they will have the records added to them.
>>
>> This does mean that if a LOT of records are added, the new time you
>> use a view it may be a touch slow, but normally it isn't a problem.
>>
>> --- Blair
>>
>>
>
>
Re: Newbie question regarding Bulk Documents
Posted by Kai Griffin <ka...@griffinbyteworks.com>.
I have the part of my application that uploads lots of bulk docs perform
a view request every x-number of documents (roughly around every 50).
That spreads the time required to upload the view out, so that when it's
time for someone to look at a view, the indexes are either already
updated, or very nearly so.
Cheers,
Kai
On 21/05/2009 23:36, Blair Nilsson wrote:
> 2009/5/22 Aníbal Rojas <an...@gmail.com>:
>
>> Hello,
>>
>> Once a POST request to the /whatever/_bulk_docs URI finishes and a
>> response is generated by CouchDB, does this assure all the views have
>> been updated? Could not find this behavior expĺained in the API
>>
>> Thanks in advance,
>>
>> --
>> Aníbal Rojas
>> @anibalrojas
>>
>>
>
> The views will not be updated until someone looks at them. In saying
> that, you can treat them as updated because next time they are used,
> they will have the records added to them.
>
> This does mean that if a LOT of records are added, the new time you
> use a view it may be a touch slow, but normally it isn't a problem.
>
> --- Blair
>
>
Re: Newbie question regarding Bulk Documents
Posted by Aníbal Rojas <an...@gmail.com>.
Blair,
Got it. It takes some time to switch from a Relational Database perspective
--
Aníbal
2009/5/22 Blair Nilsson <bl...@gmail.com>:
> 2009/5/22 Aníbal Rojas <an...@gmail.com>:
>> Hello,
>>
>> Once a POST request to the /whatever/_bulk_docs URI finishes and a
>> response is generated by CouchDB, does this assure all the views have
>> been updated? Could not find this behavior expĺained in the API
>>
>> Thanks in advance,
>>
>> --
>> Aníbal Rojas
>> @anibalrojas
>>
>
> The views will not be updated until someone looks at them. In saying
> that, you can treat them as updated because next time they are used,
> they will have the records added to them.
>
> This does mean that if a LOT of records are added, the new time you
> use a view it may be a touch slow, but normally it isn't a problem.
>
> --- Blair
>
Re: Newbie question regarding Bulk Documents
Posted by Blair Nilsson <bl...@gmail.com>.
2009/5/22 Aníbal Rojas <an...@gmail.com>:
> Hello,
>
> Once a POST request to the /whatever/_bulk_docs URI finishes and a
> response is generated by CouchDB, does this assure all the views have
> been updated? Could not find this behavior expĺained in the API
>
> Thanks in advance,
>
> --
> Aníbal Rojas
> @anibalrojas
>
The views will not be updated until someone looks at them. In saying
that, you can treat them as updated because next time they are used,
they will have the records added to them.
This does mean that if a LOT of records are added, the new time you
use a view it may be a touch slow, but normally it isn't a problem.
--- Blair