Document.Id
@Documented
@Retention(value = RetentionPolicy.CLASS)
@Target(value = [ElementType.FIELD, ElementType.METHOD])
public annotation Document.Id
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).