dspace_statistics_api/indexer.py: Use `fl` parameter

When indexing item views and downloads the only field we need is the
the id. The `fl` parameter tells Solr which fields to return in the
search results. This should theoretically be more efficient, though
I don't have any time to figure out how to measure it right now.
This commit is contained in:
Alan Orth 2020-12-17 12:22:10 +02:00
parent f3a0e3a671
commit 2407aeec70
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
1 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,7 @@ def index_views():
solr_query_params = {
"q": "type:2",
"fq": "-isBot:true AND statistics_type:view",
"fl": "id",
"facet": "true",
"facet.field": "id",
"facet.mincount": 1,
@ -93,6 +94,7 @@ def index_views():
solr_query_params = {
"q": "type:2",
"fq": "-isBot:true AND statistics_type:view",
"fl": "id",
"facet": "true",
"facet.field": "id",
"facet.mincount": 1,