mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-22 06:15:02 +01: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:
parent
f75bcf292c
commit
2acd08e0ab
@ -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
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user