dspace_statistics_api/indexer.py: Use -isBot:true

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:
Alan Orth 2020-11-17 17:40:08 +02:00
parent ecafab57cb
commit 810508d038
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
1 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ def index_views():
# see: https://lucene.apache.org/solr/guide/6_6/the-stats-component.html
solr_query_params = {
"q": "type:2",
"fq": "isBot:false AND statistics_type:view",
"fq": "-isBot:true AND statistics_type:view",
"facet": "true",
"facet.field": "id",
"facet.mincount": 1,
@ -92,7 +92,7 @@ def index_views():
solr_query_params = {
"q": "type:2",
"fq": "isBot:false AND statistics_type:view",
"fq": "-isBot:true AND statistics_type:view",
"facet": "true",
"facet.field": "id",
"facet.mincount": 1,
@ -127,7 +127,7 @@ def index_downloads():
# get the total number of distinct facets for items with at least 1 download
solr_query_params = {
"q": "type:0",
"fq": "isBot:false AND statistics_type:view AND bundleName:ORIGINAL",
"fq": "-isBot:true AND statistics_type:view AND bundleName:ORIGINAL",
"facet": "true",
"facet.field": "owningItem",
"facet.mincount": 1,
@ -173,7 +173,7 @@ def index_downloads():
solr_query_params = {
"q": "type:0",
"fq": "isBot:false AND statistics_type:view AND bundleName:ORIGINAL",
"fq": "-isBot:true AND statistics_type:view AND bundleName:ORIGINAL",
"facet": "true",
"facet.field": "owningItem",
"facet.mincount": 1,