def _applyIndex(self, query, spec): spec = _prepareSpec(spec, query) cat = self._catalog index = query._idx res = cat.indexes[index].__of__(cat)._apply_index( CatalogSearchArgumentsMap(None, {index: spec})) if res is not None: res = res[0] if res is None: # ATT: we could optimize this, but hopefully nobody specifies such # silly queries res = self._getObjectIds() return _wrapLookup(res)
def _makeOne(self, request=None, keywords=None): from Products.ZCatalog.Catalog import CatalogSearchArgumentsMap return CatalogSearchArgumentsMap(request, keywords)