本文整理汇总了Python中Products.CMFCore.CatalogTool.CatalogTool.enumerateIndexes方法的典型用法代码示例。如果您正苦于以下问题:Python CatalogTool.enumerateIndexes方法的具体用法?Python CatalogTool.enumerateIndexes怎么用?Python CatalogTool.enumerateIndexes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products.CMFCore.CatalogTool.CatalogTool
的用法示例。
在下文中一共展示了CatalogTool.enumerateIndexes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enumerateIndexes
# 需要导入模块: from Products.CMFCore.CatalogTool import CatalogTool [as 别名]
# 或者: from Products.CMFCore.CatalogTool.CatalogTool import enumerateIndexes [as 别名]
def enumerateIndexes(self):
standard = CatalogTool.enumerateIndexes(self)
custom = (('status', 'FieldIndex'),
('topic', 'FieldIndex'),
('classification', 'FieldIndex'),
('importance', 'FieldIndex'),
('security_related', 'FieldIndex'),
('confidential', 'FieldIndex'),
('resolution', 'TextIndex'),
('submitter_id', 'FieldIndex'),
('submitter_email', 'FieldIndex'),
('version_info', 'TextIndex'),
('assigned_to', 'KeywordIndex'),
('upload_number', 'KeywordIndex')
)
return standard + custom
示例2: enumerateIndexes
# 需要导入模块: from Products.CMFCore.CatalogTool import CatalogTool [as 别名]
# 或者: from Products.CMFCore.CatalogTool.CatalogTool import enumerateIndexes [as 别名]
def enumerateIndexes(self):
from Products.CMFCore.utils import SimpleRecord
plaintext_extra = SimpleRecord( lexicon_id='plaintext_lexicon'
, index_type='Okapi BM25 Rank'
)
standard = CatalogTool.enumerateIndexes(self)
custom = (('status', 'FieldIndex', None),
('topic', 'FieldIndex', None),
('classification', 'FieldIndex', None),
('importance', 'FieldIndex', None),
('security_related', 'FieldIndex', None),
('confidential', 'FieldIndex', None),
('resolution', 'ZCTextIndex', plaintext_extra),
('submitter_id', 'FieldIndex', None),
('submitter_email', 'FieldIndex', None),
('version_info', 'ZCTextIndex', plaintext_extra),
('assigned_to', 'KeywordIndex', None),
('upload_number', 'KeywordIndex', None)
)
if len(standard[0]) == 2:
# BBB compatibility with *old* CMFCore.CatalogTool
standard = tuple([index_tuple + (None,)
for index_tuple in standard])
return standard + custom