pyes icon indicating copy to clipboard operation
pyes copied to clipboard

scan=True for queryset?

Open mfyang opened this issue 11 years ago • 2 comments

often I need to do

model = generate_model('docs', 'docs', "localhost:9200")
for elem in model.objects.all():
    do_sth(elem)

if there are large quantity of docs, then it's slow to retrieve docs after a while. Can we add a 'scan=True' option when we call generate_model method?

mfyang avatar Feb 06 '14 19:02 mfyang

I'll add automatically scan to iterator if not order is required.

aparo avatar Feb 08 '14 16:02 aparo

Good. ElasticSearch 1.3 allows order in scan.

aparo avatar Aug 02 '14 06:08 aparo