diff --git a/expert/concept.py b/expert/concept.py index 456fc3a..4f29799 100644 --- a/expert/concept.py +++ b/expert/concept.py @@ -115,15 +115,17 @@ class FullQuery(BaseQuery): def query(self, text=None, type=None, useTitle=True, useFull=False, conceptTitle=None, conceptUid=None, conceptType=None, - withChildren=True, **kw): + withChildren=True, textOnly=False, **kw): result = set() scores = {} intids = component.getUtility(IIntIds) - if withChildren: - rc = self.queryConceptsWithChildren(title=conceptTitle, uid=conceptUid, - type=conceptType) - else: - rc = self.queryConcepts(title=conceptTitle, type=type) + rc = None + if not textOnly: + if withChildren: + rc = self.queryConceptsWithChildren(title=conceptTitle, uid=conceptUid, + 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... return ScoredSet(result, scores) if text or type != 'loops:*': # TODO: this may be highly inefficient!