old_contents: from django.core.management.base import BaseCommand
  from django.contrib import algoliasearch
  
  
  class Command(BaseCommand):
      help = 'Reindex all models to Algolia'
  
      def add_arguments(self, parser):
          parser.add_argument('--batchsize', nargs='?', default=1000, type=int)
          parser.add_argument('--model', nargs='+', type=str)
  
      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))
  
new_contents: from django.core.management.base import BaseCommand
  from django.contrib import algoliasearch
  
  
  class Command(BaseCommand):
      help = 'Reindex all models to Algolia'
  
      def add_arguments(self, parser):
          parser.add_argument('--batchsize', nargs='?', default=1000, type=int)
          parser.add_argument('--model', nargs='+', type=str)
  
      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', 1000))
              self.stdout.write('\t* {} --> {}'.format(model.__name__, counts))
  
subject: Fix #22 --batch-size of reindex command for Django 1.7