mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-25 15:48:20 +01:00
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:
parent
f3a0e3a671
commit
2407aeec70
@ -47,6 +47,7 @@ def index_views():
|
|||||||
solr_query_params = {
|
solr_query_params = {
|
||||||
"q": "type:2",
|
"q": "type:2",
|
||||||
"fq": "-isBot:true AND statistics_type:view",
|
"fq": "-isBot:true AND statistics_type:view",
|
||||||
|
"fl": "id",
|
||||||
"facet": "true",
|
"facet": "true",
|
||||||
"facet.field": "id",
|
"facet.field": "id",
|
||||||
"facet.mincount": 1,
|
"facet.mincount": 1,
|
||||||
@ -93,6 +94,7 @@ def index_views():
|
|||||||
solr_query_params = {
|
solr_query_params = {
|
||||||
"q": "type:2",
|
"q": "type:2",
|
||||||
"fq": "-isBot:true AND statistics_type:view",
|
"fq": "-isBot:true AND statistics_type:view",
|
||||||
|
"fl": "id",
|
||||||
"facet": "true",
|
"facet": "true",
|
||||||
"facet.field": "id",
|
"facet.field": "id",
|
||||||
"facet.mincount": 1,
|
"facet.mincount": 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user