+@dataclass
+class Document:
+ """A class representing a searchable document."""
+
+ docid: str = ''
+ """A unique identifier for each document -- must be provided
+ by the caller. See :meth:`python_modules.id_generator.get` or
+ :meth:`python_modules.string_utils.generate_uuid` for potential
+ sources."""
+
+ tags: Set[str] = field(default_factory=set)
+ """A set of tag strings for this document. May be empty. Tags
+ are simply text labels that are associated with a document and
+ may be used to search for it later.
+ """
+
+ properties: List[Tuple[str, str]] = field(default_factory=list)
+ """A list of key->value strings for this document. May be empty.
+ Properties are more flexible tags that have both a label and a
+ value. e.g. "category:mystery" or "author:smith"."""