(self, path, field_name, nested_filter, desc=False, reset_sort=True)
return self._sort(sort_field, reset_sort)
Order results by the value of a nested field
Order results by the value of a nested field
Order results by the value of a nested field
def nested_sort(self, path, field_name, nested_filter, desc=False, reset_sort=True):
        """Order results by the value of a nested field
        """
        sort_field = {
            '{}.{}'.format(path, field_name): {
                'order': 'desc' if desc else 'asc',
                'nested_filter': nested_filter,
            }
        }
        return self._sort(sort_field, reset_sort)
def nested_sort ( self , path , field_name , nested_filter , desc = False , reset_sort = True ) : sort_field = { '{}.{}' . format ( path , field_name ) : { 'order' : 'desc' if desc else 'asc' , 'nested_filter' : nested_filter , } } return self . _sort ( sort_field , reset_sort )