[Zope] Re: Zcatalog question

Maik Jablonski maik.jablonski at uni-bielefeld.de
Tue Jan 6 11:11:45 EST 2004


Steve Lenti wrote:
> I have a Zcatalog setup to handle bunches of small xml files that are
> being stored as DTML Documents.  When I do a query I would like to make
> the results unique on a fieldindex that is called ad_num.  Is there a
> way to filter the results of a query to be unique on a fieldindex.  I
> realize I can step through the results and filter out the duplicates but
> is there a more optimal way of doing this.  I tried messing with
> something like this:
> 
> context.Catalog({ 'adTextidx' : adTextidx}).uniqueValuesFor('ad_num')
> 
> but this unfortunatly does not work.

Use something like:

context.Catalog.uniqueValuesFor('ad_num')

-mj




More information about the Zope mailing list