mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2025-05-10 23:26:02 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
a016916995
|
|||
6fd2827a7c
|
@ -4,6 +4,10 @@ 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).
|
||||||
|
|
||||||
|
### [0.5.1] - 2018-10-24
|
||||||
|
## Changed
|
||||||
|
- Use Python's native json instead of ujson
|
||||||
|
|
||||||
### [0.5.0] - 2018-10-24
|
### [0.5.0] - 2018-10-24
|
||||||
## Added
|
## Added
|
||||||
- Example nginx configuration to README.md
|
- Example nginx configuration to README.md
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
# See: https://wiki.duraspace.org/display/DSPACE/Solr
|
# See: https://wiki.duraspace.org/display/DSPACE/Solr
|
||||||
|
|
||||||
from database import database_connection
|
from database import database_connection
|
||||||
import ujson
|
import json
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
from solr import solr_connection
|
from solr import solr_connection
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ def index_views():
|
|||||||
}, rows=0)
|
}, rows=0)
|
||||||
|
|
||||||
# get total number of distinct facets (countDistinct)
|
# get total number of distinct facets (countDistinct)
|
||||||
results_totalNumFacets = ujson.loads(res.get_json())['stats']['stats_fields']['id']['countDistinct']
|
results_totalNumFacets = json.loads(res.get_json())['stats']['stats_fields']['id']['countDistinct']
|
||||||
|
|
||||||
# divide results into "pages" (cast to int to effectively round down)
|
# divide results into "pages" (cast to int to effectively round down)
|
||||||
results_per_page = 100
|
results_per_page = 100
|
||||||
@ -115,7 +115,7 @@ def index_downloads():
|
|||||||
}, rows=0)
|
}, rows=0)
|
||||||
|
|
||||||
# get total number of distinct facets (countDistinct)
|
# get total number of distinct facets (countDistinct)
|
||||||
results_totalNumFacets = ujson.loads(res.get_json())['stats']['stats_fields']['owningItem']['countDistinct']
|
results_totalNumFacets = json.loads(res.get_json())['stats']['stats_fields']['owningItem']['countDistinct']
|
||||||
|
|
||||||
# divide results into "pages" (cast to int to effectively round down)
|
# divide results into "pages" (cast to int to effectively round down)
|
||||||
results_per_page = 100
|
results_per_page = 100
|
||||||
|
@ -9,5 +9,4 @@ python-mimeparse==1.6.0
|
|||||||
requests==2.19.1
|
requests==2.19.1
|
||||||
six==1.11.0
|
six==1.11.0
|
||||||
SolrClient==0.2.1
|
SolrClient==0.2.1
|
||||||
ujson==1.35
|
|
||||||
urllib3==1.23
|
urllib3==1.23
|
||||||
|
Reference in New Issue
Block a user