(self, include, exclude=None)
return query
Restrict the output of _source in the queryset. This can be used to return an object in a queryset
Restrict the output of _source in the queryset. This can be used to return an object in a queryset
Restrict the output of _source in the queryset . This can be used to return an object in a queryset
def source(self, include, exclude=None):
        """
            Restrict the output of _source in the queryset. This can be used to return an object in a queryset
        """
        self._exclude_source = False

        source = include
        if exclude:
            source = {
                'include': include,
                'exclude': exclude
            }
        query = deepcopy(self)
        query._source = source
        return query
def source ( self , include , exclude = None ) : self . _exclude_source = False source = include if exclude : source = { 'include' : include , 'exclude' : exclude } query = deepcopy ( self ) query . _source = source return query