[Zope-CMF] How to do globbing searches on the id index w/ ZCa talog

sean.upton@uniontrib.com sean.upton@uniontrib.com
Wed, 07 May 2003 11:45:40 -0700


Not sure if this will break anything.  Worth a try on a test site, since you
can always undo it...

-----Original Message-----
From: Braun Brelin [mailto:bbrelin@openapp.biz]
Sent: Tuesday, May 06, 2003 11:52 AM
To: zope-cmf@zope.org
Subject: RE: [Zope-CMF] How to do globbing searches on the id index w/
ZCa talog


What about just changing id to be a text index rather than a field
index? 

Braun 


On Wed, 2003-05-07 at 19:00, sean.upton@uniontrib.com wrote:
> Not tried, but might work: Create a skin method with a name 'idtext' that
> returns context.id, and add a TextIndex with the same name to the catalog.
> Adjust your search code to use that index.
> 
> Sean
> 
> -----Original Message-----
> From: Braun Brelin [mailto:bbrelin@openapp.biz]
> Sent: Tuesday, May 06, 2003 11:01 AM
> To: zope-cmf@zope.org
> Subject: [Zope-CMF] How to do globbing searches on the id index w/
> ZCatalog
> 
> 
> Hello,
> 
> If I have objects who's id's are like foo.1 foo.2 foo.3, etc.  
> How would I do a catalog search (in python) that will pick up foo.*?
> this...
> 
> foo=context.portal_catalog(id='foo.*')
> 
> seems to fail completely, probahly because id is a field index, not a
> text index.  
> 
> Any thoughts on how to do wildcard searches on ID's? 
> 
> Thanks,
> 
> Braun Brelin
> 
> 
> 
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests



_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests