On Mon, Jan 17, 2011 at 4:57 PM, Marcel Offermans
<marcel.offermans at luminis.nl> wrote:
> On 17 Jan 2011, at 16:40 , Mark Machielsen wrote:
>
>> /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.
>
> How can /rest/index/[indexname] be an element URI when lateron you state that 
> PUT /rest/index/[indexname] adds a new document (to the collection)? What 
> happens here when I GET /rest/index/[indexname] without any query? Do I 
> simply get a list of all things in [indexname]?

He can, because he did not talk about adding it to a collection. You
introduced this in reference to "a collection of resources" used in
the REST context. In Mark's setup the "index" is the file, not the
directory. If you PUT a file you update it with the body that
accompanies the PUT. (as I mentioned in the prev post, partial updates
is debatable but that is a different matter). Therefore a GET on will
return a representation of that index. It does not matter (in the
context of this discussion) how that looks so for arguments sake let
it be "HELLO WORLD"  when doing the GET with a custom vnd
accept-encoding :)

Regards,
Bram

Reply via email to