mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-22 06:15:02 +01:00
dspace_statistics_api/indexer.py: Fix minor issues raised by flake8
This commit is contained in:
parent
3540ce328b
commit
eeb8e6bba1
@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
from .config import SOLR_SERVER
|
from .config import SOLR_SERVER
|
||||||
from .database import DatabaseManager
|
from .database import DatabaseManager
|
||||||
import json
|
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
import re
|
import re
|
||||||
import requests
|
import requests
|
||||||
@ -146,7 +145,7 @@ def index_views():
|
|||||||
'shards': shards,
|
'shards': shards,
|
||||||
'rows': 0,
|
'rows': 0,
|
||||||
'wt': 'json',
|
'wt': 'json',
|
||||||
'json.nl': 'map' # return facets as a dict instead of a flat list
|
'json.nl': 'map' # return facets as a dict instead of a flat list
|
||||||
}
|
}
|
||||||
|
|
||||||
solr_url = SOLR_SERVER + '/statistics/select'
|
solr_url = SOLR_SERVER + '/statistics/select'
|
||||||
@ -172,7 +171,7 @@ def index_views():
|
|||||||
|
|
||||||
def index_downloads():
|
def index_downloads():
|
||||||
# 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': 'type:0',
|
'q': 'type:0',
|
||||||
'fq': 'isBot:false AND statistics_type:view AND bundleName:ORIGINAL',
|
'fq': 'isBot:false AND statistics_type:view AND bundleName:ORIGINAL',
|
||||||
'facet': 'true',
|
'facet': 'true',
|
||||||
@ -225,7 +224,7 @@ def index_downloads():
|
|||||||
'shards': shards,
|
'shards': shards,
|
||||||
'rows': 0,
|
'rows': 0,
|
||||||
'wt': 'json',
|
'wt': 'json',
|
||||||
'json.nl': 'map' # return facets as a dict instead of a flat list
|
'json.nl': 'map' # return facets as a dict instead of a flat list
|
||||||
}
|
}
|
||||||
|
|
||||||
solr_url = SOLR_SERVER + '/statistics/select'
|
solr_url = SOLR_SERVER + '/statistics/select'
|
||||||
|
Loading…
Reference in New Issue
Block a user