(self)
Build out the es_query dict
Build out the es_query dict
Build out the es_query dict
def _assemble(self):
        """Build out the es_query dict"""
        self._filters.extend(list(self._default_filters.values()))
        if self._start is not None:
            self.es_query['from'] = self._start
        self.es_query['size'] = self._size if self._size is not None else SIZE_LIMIT
        if self._exclude_source:
            self.es_query['_source'] = False
        elif self._source is not None:
            self.es_query['_source'] = self._source
        if self._aggregations:
            self.es_query['aggs'] = {
                agg.name: agg.assemble()
                for agg in self._aggregations
            }
def _assemble ( self ) : self . _filters . extend ( list ( self . _default_filters . values ( ) ) ) if self . _start is not None : self . es_query [ 'from' ] = self . _start self . es_query [ 'size' ] = self . _size if self . _size is not None else SIZE_LIMIT if self . _exclude_source : self . es_query [ '_source' ] = False elif self . _source is not None : self . es_query [ '_source' ] = self . _source if self . _aggregations : self . es_query [ 'aggs' ] = { agg . name : agg . assemble ( ) for agg in self . _aggregations }