public static abstract @interface Document.Id
implements Annotation


Marks a member field of a document as the document's unique identifier (ID).

Indexing a document with a particular ID replaces any existing documents with the same ID in that namespace.

A document must have exactly one such field, and it must be of type String.

See the class description of Document for other requirements (i.e. it must be visible, or have a visible getter and setter, or be exposed through a visible constructor).


Inherited methods