Document.Namespace

@Documented
@Retention(value = RetentionPolicy.CLASS)
@Target(value = [ElementType.FIELD, ElementType.METHOD])
public annotation Document.Namespace


Marks a member field of a document as the document's namespace.

The namespace is an arbitrary user-provided string that can be used to group documents during querying or deletion. 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. if present it must be visible, or have a visible getter and setter, or be exposed through a visible constructor).