def to_vespa_document(self) -> Dict[str, Any]:
        """
        Converts this SemiStructuredVespaDocument object to a Vespa document format.
        
        @return: Dictionary containing the Vespa document representation with document ID and fields
        
        The returned document will have empty fields removed. The document structure follows Vespa's 
        expected format with a document ID and fields dictionary containing:
        - Fixed fields (integers, floats, booleans etc)
        - Text fields
        - Tensor fields 
        - Vector count
        - String arrays (handled differently based on partial update support)
        """
        vespa_fields = {
            **{k: v for k, v in self.fixed_fields.model_dump(exclude_none=True, by_alias=True).items() if v or v == 0},
            **self.text_fields,
            **self.tensor_fields,
            common.FIELD_VECTOR_COUNT: self.fixed_fields.vector_counts,
        }

        if self.index_supports_partial_updates:
            if self.string_array_fields is not None:
                for string_array_key, string_array_value in self.string_array_fields.items():
                    key = f'{common.STRING_ARRAY}_{string_array_key}'
                    vespa_fields[key] = string_array_value
        else:
            vespa_fields[common.STRING_ARRAY] = self.fixed_fields.string_arrays

        return {_VESPA_DOC_ID: self.id, _VESPA_DOC_FIELDS: vespa_fields}

        Converts this SemiStructuredVespaDocument object to a Vespa document format.
        
        @return: Dictionary containing the Vespa document representation with document ID and fields
        
        The returned document will have empty fields removed. The document structure follows Vespa's 
        expected format with a document ID and fields dictionary containing:
        - Fixed fields (integers, floats, booleans etc)
        - Text fields
        - Tensor fields 
        - Vector count
        - String arrays (handled differently based on partial update support)
        
src/marqo/core/semi_structured_vespa_index/semi_structured_document.py