bug fix for empty type query result
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3390 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									bf50ca5256
								
							
						
					
					
						commit
						61999058e2
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
					@ -148,10 +148,11 @@ class FullQuery(BaseQuery):
 | 
				
			||||||
                if not r1 and not r2:
 | 
					                if not r1 and not r2:
 | 
				
			||||||
                    r1 = cat.apply(criteria)    # search only for type
 | 
					                    r1 = cat.apply(criteria)    # search only for type
 | 
				
			||||||
                x, uids = weightedUnion(r1, r2) #result = r1.union(r2)
 | 
					                x, uids = weightedUnion(r1, r2) #result = r1.union(r2)
 | 
				
			||||||
                for r, score in uids.items():
 | 
					                if uids:
 | 
				
			||||||
                    obj = intids.getObject(r)
 | 
					                    for r, score in uids.items():
 | 
				
			||||||
                    result.add(obj)
 | 
					                        obj = intids.getObject(r)
 | 
				
			||||||
                    scores[obj] = score
 | 
					                        result.add(obj)
 | 
				
			||||||
 | 
					                        scores[obj] = score
 | 
				
			||||||
        if rc is not None:
 | 
					        if rc is not None:
 | 
				
			||||||
            if result:
 | 
					            if result:
 | 
				
			||||||
                result = result.intersection(rc)
 | 
					                result = result.intersection(rc)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue