From f58c2096099d44d0852aabaf8d42a9449d970d31 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 25 Sep 2020 13:25:34 +0300 Subject: [PATCH] dspace_statistics_api/indexer.py: Update comment I don't remember why we needed the stats, but it seems that it was because without them there is no way to know how many results were returned and therefore no way to know how many pages we'll need to iterate over. Having the total number allows us to use a limit and and offset to page through them deterministically. --- dspace_statistics_api/indexer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dspace_statistics_api/indexer.py b/dspace_statistics_api/indexer.py index 0e38f6b..18738a7 100644 --- a/dspace_statistics_api/indexer.py +++ b/dspace_statistics_api/indexer.py @@ -40,7 +40,8 @@ def index_views(): # get total number of distinct facets for items with a minimum of 1 view, # otherwise Solr returns all kinds of weird ids that are actually not in # the database. Also, stats are expensive, but we need stats.calcdistinct - # so we can get the countDistinct summary. + # so we can get the countDistinct summary to calculate how many pages of + # results we have. # # see: https://lucene.apache.org/solr/guide/6_6/the-stats-component.html solr_query_params = {