1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2025-05-08 06:06:01 +02:00

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:
2019-04-15 10:25:54 +03:00
parent f75bcf292c
commit 2acd08e0ab
2 changed files with 5 additions and 2 deletions

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',