You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Commands: Documents: How to get document metadata only?

Head is used to retrieve document metadata from a database.

Syntax

JsonDocumentMetadata Head(string key);

Parameters
key string key of a document to get metadata for
Return Value
JsonDocumentMetadata Metadata information for document with given key.

Example

JsonDocumentMetadata metadata = store.DatabaseCommands.Head("employees/1"); // null if does not exist