provide general-purpose 'loops_keywords' index
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3811 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
6b8545754c
commit
4d6032e5d3
1 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@ from zope.cachedescriptors.property import Lazy
|
|||
|
||||
from cybertools.catalog.query import Term, Eq, Between, And, Or
|
||||
from cybertools.catalog.query import Text as BaseText
|
||||
from cybertools.catalog.query import AnyOf
|
||||
from cybertools.catalog.query import AllOf, AnyOf
|
||||
from loops.expert.interfaces import IQuery
|
||||
from loops.security.common import canListObject
|
||||
from loops import util
|
||||
|
@ -75,16 +75,16 @@ def State(statesDefinition, value):
|
|||
return AnyOf(stateIndex, [':'.join((statesDefinition, v)) for v in value])
|
||||
|
||||
@implementer(IQuery)
|
||||
def KeywordsAllOff(statesDefinition, value):
|
||||
def AllKeywords(value):
|
||||
if not isinstance(value, (list, tuple)):
|
||||
value = [value]
|
||||
return AllOf(keywordsIndex, [':'.join((statesDefinition, v)) for v in value])
|
||||
return AllOf(keywordsIndex, value)
|
||||
|
||||
@implementer(IQuery)
|
||||
def KeywordsAnyOff(statesDefinition, value):
|
||||
def AnyKeyword(value):
|
||||
if not isinstance(value, (list, tuple)):
|
||||
value = [value]
|
||||
return AnyOf(keywordsIndex, [':'.join((statesDefinition, v)) for v in value])
|
||||
return AnyOf(keywordsIndex, value)
|
||||
|
||||
|
||||
# concept map queries
|
||||
|
|
Loading…
Add table
Reference in a new issue