Error using progress bar: Max must be a positive i

2019-07-16 03:40发布

问题:

Whenever I reindex a with solr, I get the following error

$ RAILS_ENV=development rake sunspot:solr:reindex
Error using progress bar: Max must be a positive integer

How do I fix this?

回答1:

The possible reason is, your database to reinstall has no data. The progress bar is to show "how much has reindexed / how much records in DB". So if you have no data, the progress bar can't be initialized. Sunspot is expected to show a better error message