additional flags for controlling querying
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3461 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									67184c9170
								
							
						
					
					
						commit
						52b68bcfb6
					
				
					 1 changed files with 8 additions and 6 deletions
				
			
		|  | @ -115,15 +115,17 @@ class FullQuery(BaseQuery): | ||||||
| 
 | 
 | ||||||
|     def query(self, text=None, type=None, useTitle=True, useFull=False, |     def query(self, text=None, type=None, useTitle=True, useFull=False, | ||||||
|                     conceptTitle=None, conceptUid=None, conceptType=None, |                     conceptTitle=None, conceptUid=None, conceptType=None, | ||||||
|                     withChildren=True, **kw): |                     withChildren=True, textOnly=False, **kw): | ||||||
|         result = set() |         result = set() | ||||||
|         scores = {} |         scores = {} | ||||||
|         intids = component.getUtility(IIntIds) |         intids = component.getUtility(IIntIds) | ||||||
|         if withChildren: |         rc = None | ||||||
|             rc = self.queryConceptsWithChildren(title=conceptTitle, uid=conceptUid, |         if not textOnly: | ||||||
|                                                 type=conceptType) |             if withChildren: | ||||||
|         else: |                 rc = self.queryConceptsWithChildren(title=conceptTitle, uid=conceptUid, | ||||||
|             rc = self.queryConcepts(title=conceptTitle, type=type) |                                                     type=conceptType) | ||||||
|  |             else: | ||||||
|  |                 rc = self.queryConcepts(title=conceptTitle, type=type) | ||||||
|         if not rc and not text and '*' in type: # there should be some sort of selection... |         if not rc and not text and '*' in type: # there should be some sort of selection... | ||||||
|             return ScoredSet(result, scores) |             return ScoredSet(result, scores) | ||||||
|         if text or type != 'loops:*':  # TODO: this may be highly inefficient! |         if text or type != 'loops:*':  # TODO: this may be highly inefficient! | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 helmutm
						helmutm