private function getFieldNames(Document $document)
    {
        $result = [];
        foreach ($document->getFields() as $field) {
            $result[$field->getFieldName()] = $field->getExposedName();
        }
        return $result;
    }