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.

Regards,
Mark.

From: amdatu-developers-bounces at amdatu.org 
[mailto:[email protected]] On Behalf Of Marcel Offermans
Sent: Monday, January 17, 2011 4:21 PM
To: amdatu-developers at amdatu.org
Subject: Re: [Amdatu-developers] Search & index REST API

On 17 Jan 2011, at 15:32 , Ivo Ladage-van Doorn wrote:


For the paging I would implement this the way I did this in the useradmin REST 
service. This implementation is quite similar to the page Bram referred to, but 
using Atom syndication links instead of proprietary links for HATEOAS.
Regarding PUT/POST for create/update; PUT requests should be idempotent in 
contrast to POST requests. So a POST to /rest/index/[indexname] could 
potentially create a new index, a PUT can only update an existing entry (if it 
exists). 

So you're saying that wikipedia is wrong?

http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services

Greetings, Marcel


Reply via email to