mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-12-22 20:52:19 +01:00
dspace_statistics_api/stats.py: Use -isBot:true
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Minor change to bot filtering. We should use a negated match for documents that have `isBot:true` rather than looking for documents that are tagged with `isBot:false` (the distinction is subtle, but important).
This commit is contained in:
parent
8a1244d2d0
commit
ab82e90773
@ -21,7 +21,7 @@ def get_views(solr_date_string: str, elements: list, facetField: str):
|
||||
|
||||
solr_query_params = {
|
||||
"q": f"{facetField}:({solr_elements_string})",
|
||||
"fq": f"type:2 AND isBot:false AND statistics_type:view AND time:{solr_date_string}",
|
||||
"fq": f"type:2 AND -isBot:true AND statistics_type:view AND time:{solr_date_string}",
|
||||
"fl": facetField,
|
||||
"facet": "true",
|
||||
"facet.field": facetField,
|
||||
@ -83,7 +83,7 @@ def get_downloads(solr_date_string: str, elements: list, facetField: str):
|
||||
|
||||
solr_query_params = {
|
||||
"q": f"{facetField}:({solr_elements_string})",
|
||||
"fq": f"type:0 AND isBot:false AND statistics_type:view AND bundleName:ORIGINAL AND time:{solr_date_string}",
|
||||
"fq": f"type:0 AND -isBot:true AND statistics_type:view AND bundleName:ORIGINAL AND time:{solr_date_string}",
|
||||
"fl": facetField,
|
||||
"facet": "true",
|
||||
"facet.field": facetField,
|
||||
|
Loading…
Reference in New Issue
Block a user