Use one-based paging in indexer output

It is easier for humans to understand one-based paging output like
"page 1 of 3" than "page 0 of 2" in the indexer.
This commit is contained in:
Alan Orth 2019-04-15 10:25:54 +03:00
parent f75bcf292c
commit 2acd08e0ab
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 5 additions and 2 deletions

View File

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Use vanilla requests library instead of SolrClient
- Use one-based paging in indexer output (for human readability)
## [0.9.0] - 2019-01-22
### Updated

View File

@ -132,7 +132,8 @@ def index_views():
data = []
while results_current_page <= results_num_pages:
print('Indexing item views (page {} of {})'.format(results_current_page, results_num_pages))
# "pages" are zero based, but one based is more human readable
print('Indexing item views (page {} of {})'.format(results_current_page + 1, results_num_pages + 1))
solr_query_params = {
'q': 'type:2',
@ -210,7 +211,8 @@ def index_downloads():
data = []
while results_current_page <= results_num_pages:
print('Indexing item downloads (page {} of {})'.format(results_current_page, results_num_pages))
# "pages" are zero based, but one based is more human readable
print('Indexing item downloads (page {} of {})'.format(results_current_page + 1, results_num_pages + 1))
solr_query_params = {
'q': 'type:0',