On Thu, 22 Feb 2001, Johan Carlsson wrote:

> > Casey Duncan <[EMAIL PROTECTED]> wrote:
> > > 
> > > Yes, you always get all the meta-data. However, does
> > > anyone know how the "used" argument of
> > > ZCatalog.searchResults works, or why you would use it?
> > 
> > 'used' tells you the names of the indexes which actually
> > participated in the search (as distinct from those you
> > asked for).
> What does this meen?
> Example, What's the different between:
>   searchResults(used=(index1,index2), index1='kalle', index2='kaviar')
> and;
>   searchResults(index1='kalle', index2='kaviar')

There is no practical difference, unless you are "federating"
queries across multiple catalogs;  the 'used' parameter is there
solely to accumulate a record of the indices used in the search.
> (Are used supposed to be a tuple?)

It should be something supporting the mapping interface.  Here is
how it is used (from 'lib/python/Products/ZCatalog/Catalog.py'):

  if used is None: used={}
  for i in self.indexes.keys():
          index = self.indexes[i].__of__(self)
          if hasattr(index,'_apply_index'):
              if r is not None:
                  r, u = r
                  for name in u:

In other words, "Nothing to see here;  move along." :)

Tres Seaver                                [EMAIL PROTECTED]
Digital Creations     "Zope Dealers"       http://www.zope.org

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to