On Mon, Jan 17, 2011 at 4:40 PM, Mark Machielsen <Mark.Machielsen at gxsoftware.com> wrote: > Hi Marcel, > > /rest/index/[indexname] is an element URI. Wikipedia states for a put for an > element URI: "Update the addressed member of the collection, or if it doesn't > exist, create it.". > So when I add a document, this is an update of the index (with identifier > indexname]). I only pass on the document I want to add, so this is a partial > update.
There is some fuzz around partial updates in the bloggosphere and it does spark a philisophical discussion on the meaning of idempotence :) Questions around the implementation of the index arise. Eg. if you PUT the same document to the index twice what happens? Is the first incarnation updated (partial update / idempotent I guess) or does it kind of append it (state change / non idempotent). Most seem to say... if you need partial updates use subresources, but I'n not sure if in this case not sure if you want to expose this level of detail in the API. The Roy Fielding tells us it is ok to use POST (http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post) :) grz Bram

