ztfy/utils/catalog/index.py
branchZTK-1.1
changeset 70 82d8de021806
parent 42 cb2a0e2d3bbf
child 73 96079b5bdc1f
equal deleted inserted replaced
69:ddab9a29b54b 70:82d8de021806
    27 
    27 
    28 # import local interfaces
    28 # import local interfaces
    29 
    29 
    30 # import Zope3 packages
    30 # import Zope3 packages
    31 from zope.app import zapi
    31 from zope.app import zapi
    32 from zope.app.catalog.attribute import AttributeIndex
    32 from zope.catalog.attribute import AttributeIndex
    33 from zope.app.container.contained import Contained
    33 from zope.container.contained import Contained
    34 from zope.interface import implements
    34 from zope.interface import implements
    35 from zopyx.txng3.core import config
    35 from zopyx.txng3.core import config
    36 from zopyx.txng3.core.index import Index
    36 from zopyx.txng3.core.index import Index
    37 
    37 
    38 # import local packages
    38 # import local packages
    39 from hurry.query.query import IndexTerm
    39 from hurry.query.query import IndexTerm
    40 
    40 
    41 
    41 
    42 class TextIndexNG(AttributeIndex, Persistent, Contained):
    42 class TextIndexNG(AttributeIndex, Persistent, Contained):
    43     """Adaptation of zopyx.txng3.core for use zope.app.catalog index"""
    43     """Adaptation of zopyx.txng3.core for use zope.catalog index"""
    44 
    44 
    45     implements(IInjection, IStatistics, IIndexSearch, ITingIndex)
    45     implements(IInjection, IStatistics, IIndexSearch, ITingIndex)
    46 
    46 
    47     def __init__(self,
    47     def __init__(self,
    48                  field_name=None,
    48                  field_name=None,