1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-22 06:15:02 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
2707cb37d5
CHANGELOG.md: Add note about fl parameter
Some checks failed
continuous-integration/drone/push Build is failing
2020-12-17 12:27:11 +02:00
2407aeec70
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.
2020-12-17 12:25:28 +02:00
2 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Add ORDER BY to /items resource to make sure results are returned
deterministically
- Use `fl` parameter in indexer to return only the id field
## [1.3.2] - 2020-11-18
### Fixed

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,