On Jan 17, 2011, at 20:01 , Bram de Kruijff wrote: > On Mon, Jan 17, 2011 at 5:26 PM, Marcel Offermans > <marcel.offermans at luminis.nl> wrote: >> >> On 17 Jan 2011, at 17:14 , Bram de Kruijff wrote: >> >>> 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 :) >> >> So an index is a file to which you can only add documents, and not a >> collection? >> >> I assumed an index was a collection of documents that are indexed that >> supports basic CRUD operations. I also assumed you could query that index in >> two ways: with a query string and without (returning all indexed documents). > > Yes, that is the source of confusion :)
Check! :) > Not saying your assumption is > invalid. I rather think it is a design choice whether you want to > expose the 'documents' in the 'index' through the REST API and/or > wether there is a reasonable implementation for doing this. And yes if > we are doing that we'll need some paging support :) Well, if we need paging support for doing queries, and we're not explicitly excluding a query that will return all documents and/or some other reasonable limit on the length of a single request, we'll indeed definitely need paging! :) I'm no Solr expert, but I guess it does support querying all documents?! Greetings, Marcel

