def get_jobs_from_last_week(): """Jobs created the last 7 days.""" query = Q("range", **{"_created": {"gte": "now-7d/d", "lt": "now/d"}}) & Q( "term", status="open" ) search = JobsSearch().query(query).params(size=10000).sort("-_created") return search.execute().hits
def get_jobs_from_last_week(): """Jobs created the last 7 days.""" query = Q("range", **{"_created": {"gte": "now-7d/d", "lt": "now/d"}}) search = JobsSearch().query(query).sort("-_created") return search.execute().hits