def serialize(self):
if not self.field:<EOL><INDENT>raise InvalidSortOrder('<STR_LIT>')<EOL><DEDENT>return {self.field: self.serialize_order_params()}<EOL>
Serialize the search to a structure as passed for a search body.