Exemplo n.º 1
0
 def show(self):
     oid = get_oid(self.context)
     catalogs = []
     for catalog in find_catalogs(self.context):
         indexes = []
         catalogs.append((catalog, indexes))
         for index in catalog.values():
             docrepr = index.document_repr(oid, '(not indexed)')
             indexes.append({'index':index, 'value':docrepr})
     return {'catalogs':catalogs}
Exemplo n.º 2
0
 def show(self):
     oid = get_oid(self.context)
     catalogs = []
     for catalog in find_catalogs(self.context):
         indexes = []
         catalogs.append((catalog, indexes))
         for index in catalog.values():
             docrepr = index.document_repr(oid, '(not indexed)')
             indexes.append({'index': index, 'value': docrepr})
     return {'catalogs': catalogs}
Exemplo n.º 3
0
 def reindex(self):
     context = self.context
     request = self.request
     check_csrf_token(request)
     oid = get_oid(context)
     for catalog in find_catalogs(context):
         catalog.reindex_resource(
             context, oid=oid, action_mode=MODE_IMMEDIATE
             )
     request.sdiapi.flash_with_undo('Object reindexed', 'success')
     return HTTPFound(request.sdiapi.mgmt_url(context, '@@indexing'))
Exemplo n.º 4
0
 def reindex(self):
     context = self.context
     request = self.request
     check_csrf_token(request)
     oid = get_oid(context)
     for catalog in find_catalogs(context):
         catalog.reindex_resource(context,
                                  oid=oid,
                                  action_mode=MODE_IMMEDIATE)
     request.sdiapi.flash_with_undo('Object reindexed', 'success')
     return HTTPFound(request.sdiapi.mgmt_url(context, '@@indexing'))