有没有办法通过查询目录获取所有唯一关键字索引,即Plone中的主题?
我一直在使用this作为指导,但尚未成功。
这是我目前的情况
def search_content_by_keywords(self):
"""
Attempting to search the catalog
"""
catalog = self.context.portal_catalog
query = {}
query['Subject'] = 'Someval'
results = catalog.searchResults(query)
return results
我不想传递关键字,而是想获取所有关键字
最佳答案
catalog = self.context.portal_catalog
my_keys = catalog.uniqueValuesFor('Subject')
引用:http://docs.plone.org/develop/plone/searching_and_indexing/query.html#unique-values
关于 python /Plone : Getting all unique keywords (Subject),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10497342/