Commands: Documents: How to get document metadata only?

Head is used to retrieve document metadata from a database.

Syntax

public 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.getDatabaseCommands().head("employees/1"); // null if does not exist