From 3292a62dac2b35937180dcf9dfcae565d7dea333 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Tue, 24 Jun 2014 16:05:50 +0200 Subject: [PATCH 1/1] bugfix. --- catalog.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/catalog.py b/catalog.py index d353d6d..1f08a83 100644 --- a/catalog.py +++ b/catalog.py @@ -117,13 +117,14 @@ class DelegatedCatalog(Catalog) : None signifie : pas de délégation, il faut continuer à interroger les autres index. IISet() vide : pas de résultat lors de la délégation, on peut arrêter la recherche. ''' - indexes = set(plan).intersection(set(self.zcat.delegatedIndexes)) + indexes = set(query.keys()).intersection(set(self.zcat.delegatedIndexes)) if not indexes : return None delegatedQuery = {} for i in indexes : delegatedQuery[i] = query.pop(i) - plan.remove(i) + try : plan.remove(i) + except ValueError : pass c = SolrConnection(self.zcat.solr_url) q =' AND '.join(['%s:"%s"' % item for item in delegatedQuery.items()]) resp = c.query(q, fields='id', rows=len(self)) -- 2.20.1