From 1a63250e4bd79d8190c9b1c12a422c79dbc038e5 Mon Sep 17 00:00:00 2001 From: Dennis Rupnow Date: Thu, 30 Aug 2018 16:33:55 +0200 Subject: [PATCH] Ensures the AND operator for fq in solr --- ckanext/harvest/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckanext/harvest/helpers.py b/ckanext/harvest/helpers.py index 6cb6ff2..320e53d 100644 --- a/ckanext/harvest/helpers.py +++ b/ckanext/harvest/helpers.py @@ -18,7 +18,7 @@ def package_list_for_source(source_id): ''' limit = 20 page = int(request.params.get('page', 1)) - fq = 'harvest_source_id:"{0}"'.format(source_id) + fq = '+harvest_source_id:"{0}"'.format(source_id) search_dict = { 'fq' : fq, 'rows': limit, @@ -66,7 +66,7 @@ def package_count_for_source(source_id): Returns the current package count for datasets associated with the given source id ''' - fq = 'harvest_source_id:"{0}"'.format(source_id) + fq = '+harvest_source_id:"{0}"'.format(source_id) search_dict = {'fq': fq} context = {'model': model, 'session': model.Session} result = logic.get_action('package_search')(context, search_dict)