def count(self, query):
        """
        Returns number of matching entries

        :type query str
        :rtype: int
        """
        body = {
            "query": {
                "bool": {
                    "must": [{
                        "query_string": {
                            "query": query,
                        }
                    }]
                }
            }
        }

        body['query']['bool']['must'].append(self._get_timestamp_filer())

        return self._es.count(index=self._index, body=body).get('count')
def count ( self , query ) : body = { "query" : { "bool" : { "must" : [ { "query_string" : { "query" : query , } } ] } } } body [ 'query' ] [ 'bool' ] [ 'must' ] . append ( self . _get_timestamp_filer ( ) ) return self . _es . count ( index = self . _index , body = body ) . get ( 'count' )
Returns number of matching entries

        :type query str
        :rtype: int