Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def iter_search(self, query, size=100, **kwargs):
index = CLUSTER_NAME
results = Search(using=es, index=CLUSTER_NAME).query('query_string', query=query).sort('-epoch')[:size].execute()
# print results
for hit in results:
yield Record._from_uuid(hit['uuid'])
def seed(self):
for key in trunk.list():
r = Record._from_uuid_s3(key)
r.save()
def new_record(self):
r = Record()
return r