On Fri, Jul 13, 2012 at 1:43 PM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> On Fri, Jul 13, 2012 at 1:41 PM, Jonatan Fournier
> <jonatan.fourn...@gmail.com> wrote:
>> On Fri, Jul 13, 2012 at 12:57 AM, Yonik Seeley
>> <yo...@lucidimagination.com> wrote:
>>> On Thu, Jul 12, 2012 at 3:20 PM, Jonatan Fournier
>>> <jonatan.fourn...@gmail.com> wrote:
>>>> Is there a flag for: if document does not exist, create it for me?
>>>
>>> Not currently, but it certainly makes sense.
>>> The implementation should be easy. The most difficult part is figuring
>>> out the best syntax to specify this.
>>>
>>> Another idea: we could possibly switch to create-if-not-exist by
>>> default, and use the existing optimistic concurrency mechanism to
>>> specify that the document should exist.
>>>
>>> So specify _version_=1 if the document should exist and _version_=0
>>> (the default) if you don't care.
>>
>> Yes that would be neat!
>
> I've just committed this change.

Super thanks! I assume it will end up in the 4.0 release?

>
>> One more question related to partial document update. So far I'm able
>> to append to multivalue fields, set new value to regular/multivalue
>> fields. One thing I didn't find is the "remove" command, what is its
>> JSON syntax?
>
> Set it to the JSON value of null.
>
> -Yonik
> http://lucidimagination.com

Reply via email to