You may need, in your application, to get back multiple documents from RavenDB directly. In order to avoid sending to the server multiple queries, RavenDB supports the ability to get multiple documents in a single call. The way to do this is to create a POST
request that we will post to a special URL.
Instead of posting to the docs
area structure, we will address the queries
area and in the body of our POST
request, we will specify a JSON array of all IDs we want to get back from RavenDB. The response for such a request is a JSON object that consists of two arrays of documents: Results
and Includes
. Each document also includes the metadata.
The Results
array has documents that we asked for, while the Includes
array contains optionally referenced documents. To determine what reference you want to retrieve together with a document an include
parameter has to be...