mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-25 15:48:20 +01:00
Compare commits
No commits in common. "b15afc9f394400598a5b601ebf48c77d558408d4" and "d1c177e146550d63d61dc22b204df5560d1a1249" have entirely different histories.
b15afc9f39
...
d1c177e146
@ -4,10 +4,6 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## Unreleased Changes
|
|
||||||
### Changed
|
|
||||||
- Limit Solr query to UUIDs to avoid errors with unmigrated legacy stats (https://github.com/ilri/dspace-statistics-api/issues/12)
|
|
||||||
|
|
||||||
## [1.4.0] - 2020-12-27
|
## [1.4.0] - 2020-12-27
|
||||||
### Added
|
### Added
|
||||||
- indexer.py now indexes views and downloads for communities and collections
|
- indexer.py now indexes views and downloads for communities and collections
|
||||||
|
@ -3,7 +3,6 @@ DSpace stores item view and download events in a Solr "statistics" core. This in
|
|||||||
|
|
||||||
- If your DSpace is version 4 or 5, use [dspace-statistics-api v1.1.1](https://github.com/ilri/dspace-statistics-api/releases/tag/v1.1.1)
|
- If your DSpace is version 4 or 5, use [dspace-statistics-api v1.1.1](https://github.com/ilri/dspace-statistics-api/releases/tag/v1.1.1)
|
||||||
- If your DSpace is version 6+, use [dspace-statistics-api v1.2.0 or greater](https://github.com/ilri/dspace-statistics-api/releases/tag/v1.2.0)
|
- If your DSpace is version 6+, use [dspace-statistics-api v1.2.0 or greater](https://github.com/ilri/dspace-statistics-api/releases/tag/v1.2.0)
|
||||||
- Please make sure your statistics have been migrated from integers to UUIDs with the [solr-upgrade-statistics-6x](https://wiki.lyrasis.org/display/DSDOC6x/SOLR+Statistics+Maintenance) command
|
|
||||||
|
|
||||||
This project contains an indexer and a [Falcon-based](https://falcon.readthedocs.io/) web application to make the item, community, and collection statistics available via a simple REST API. You can read more about the Solr queries used to gather the item view and download statistics on the [DSpace wiki](https://wiki.lyrasis.org/display/DSPACE/Solr).
|
This project contains an indexer and a [Falcon-based](https://falcon.readthedocs.io/) web application to make the item, community, and collection statistics available via a simple REST API. You can read more about the Solr queries used to gather the item view and download statistics on the [DSpace wiki](https://wiki.lyrasis.org/display/DSPACE/Solr).
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ def index_views(indexType: str, facetField: str):
|
|||||||
#
|
#
|
||||||
# see: https://lucene.apache.org/solr/guide/6_6/the-stats-component.html
|
# see: https://lucene.apache.org/solr/guide/6_6/the-stats-component.html
|
||||||
solr_query_params = {
|
solr_query_params = {
|
||||||
"q": f"type:2 AND {facetField}:/.{{36}}/",
|
"q": "type:2",
|
||||||
"fq": "-isBot:true AND statistics_type:view",
|
"fq": "-isBot:true AND statistics_type:view",
|
||||||
"fl": facetField,
|
"fl": facetField,
|
||||||
"facet": "true",
|
"facet": "true",
|
||||||
@ -94,7 +94,7 @@ def index_views(indexType: str, facetField: str):
|
|||||||
)
|
)
|
||||||
|
|
||||||
solr_query_params = {
|
solr_query_params = {
|
||||||
"q": f"type:2 AND {facetField}:/.{{36}}/",
|
"q": "type:2",
|
||||||
"fq": "-isBot:true AND statistics_type:view",
|
"fq": "-isBot:true AND statistics_type:view",
|
||||||
"fl": facetField,
|
"fl": facetField,
|
||||||
"facet": "true",
|
"facet": "true",
|
||||||
@ -130,7 +130,7 @@ def index_views(indexType: str, facetField: str):
|
|||||||
def index_downloads(indexType: str, facetField: str):
|
def index_downloads(indexType: str, facetField: str):
|
||||||
# get the total number of distinct facets for items with at least 1 download
|
# get the total number of distinct facets for items with at least 1 download
|
||||||
solr_query_params = {
|
solr_query_params = {
|
||||||
"q": f"type:0 AND {facetField}:/.{{36}}/",
|
"q": "type:0",
|
||||||
"fq": "-isBot:true AND statistics_type:view AND bundleName:ORIGINAL",
|
"fq": "-isBot:true AND statistics_type:view AND bundleName:ORIGINAL",
|
||||||
"fl": facetField,
|
"fl": facetField,
|
||||||
"facet": "true",
|
"facet": "true",
|
||||||
@ -176,7 +176,7 @@ def index_downloads(indexType: str, facetField: str):
|
|||||||
)
|
)
|
||||||
|
|
||||||
solr_query_params = {
|
solr_query_params = {
|
||||||
"q": f"type:0 AND {facetField}:/.{{36}}/",
|
"q": "type:0",
|
||||||
"fq": "-isBot:true AND statistics_type:view AND bundleName:ORIGINAL",
|
"fq": "-isBot:true AND statistics_type:view AND bundleName:ORIGINAL",
|
||||||
"fl": facetField,
|
"fl": facetField,
|
||||||
"facet": "true",
|
"facet": "true",
|
||||||
|
Loading…
Reference in New Issue
Block a user