本文整理匯總了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