-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
Hi, I am on django 1.7, and I cannot use the --batchsize
command to explicitly set a batch_size.
I'm trying to index hundreds of thousands of entries, and they're being indexed one at a time.
The function def reindex_all(self, batch_size=1000):
has a default batch_size of 1000, but gets overwritten in the management command.
def handle(self, *args, **options):
'''Run the management command.'''
self.stdout.write('The following models were reindexed:')
for model in algoliasearch.get_registered_model():
adapter = algoliasearch.get_adapter(model)
if options.get('model', None) and not (model.__name__ in
options['model']):
continue
counts = adapter.reindex_all(
batch_size=options.get('batchsize', None))
self.stdout.write('\t* {} --> {}'.format(model.__name__, counts))
I think a simple fix is to not override the default batchsize to None
Metadata
Metadata
Assignees
Labels
No labels