diff --git a/expert/concept.py b/expert/concept.py index 5b81035..dc238b2 100644 --- a/expert/concept.py +++ b/expert/concept.py @@ -148,10 +148,11 @@ class FullQuery(BaseQuery): if not r1 and not r2: r1 = cat.apply(criteria) # search only for type x, uids = weightedUnion(r1, r2) #result = r1.union(r2) - for r, score in uids.items(): - obj = intids.getObject(r) - result.add(obj) - scores[obj] = score + if uids: + for r, score in uids.items(): + obj = intids.getObject(r) + result.add(obj) + scores[obj] = score if rc is not None: if result: result = result.intersection(rc)