class MammothIndexes(grok.Indexes): grok.site(Herd) grok.context(IMammoth) name = index.Field() age = index.Field() message = index.Text()
class WorkflowIndexes(grok.Indexes): grok.site(Blog) grok.context(IWorkflowState) grok.name('entry_catalog') workflow_state = index.Field(attribute='getState') workflow_id = index.Field(attribute='getId')
class MammothIndexes(grok.Indexes): grok.context(Mammoth) grok.name('foo_catalog') name = index.Field() age = index.Field() message = index.Text()
class EntryIndexes(grok.Indexes): grok.site(Blog) grok.context(IEntry) grok.name('entry_catalog') title = index.Text() content = index.Text() published = index.Field() categories = index.Set()
class MammothIndexes(grok.Indexes): grok.site(Herd) grok.context(IMammoth) name = index.Field() how_old = index.Field(attribute='age')
def func(): foo = index.Field()
class MammothIndexes(grok.Indexes): grok.site(Herd) grok.context(IMammoth) foo = index.Field()
class MammothIndexes2(grok.Indexes): grok.site(Herd) grok.context(IMammoth2) name = index.Field()