def to_vespa_document(self) -> Dict[str, Any]:
        """Convert VespaDocumentObject to a Vespa document.
        Empty fields are removed from the document."""
        vespa_fields = {k: v for k, v in self.fields.dict(exclude_none=True, by_alias=True).items() if v or v == 0}

        return {self._VESPA_DOC_ID: self.id, self._VESPA_DOC_FIELDS: vespa_fields}
Convert VespaDocumentObject to a Vespa document.
        Empty fields are removed from the document.
src/marqo/core/unstructured_vespa_index/unstructured_document.py