[Zope-CMF] How to do globbing searches on the id index w/ ZCa
talog
Braun Brelin
bbrelin@openapp.biz
06 May 2003 20:38:17 +0100
Hmmm...Changing the id index to be a text index rather than a 'field'
index, doesn't seem to have made a difference. My little test script,
which looks like this:
searchid='Controlled_Document.2003-05-06.2805.*'
foo = context.portal_catalog(id=searchid)
print foo
return printed
returns an empty list. Adding a full literal ID does return a brain
instance, so I know that the portal_catalog seems to work.
Anyone with more experience in ZCatalog's able to help me out here? I
have a hard time believing that I'm the first person who's ever wanted
to do a globbing search with object id's.
Thanks,
Braun Brelin
On Wed, 2003-05-07 at 19:45, sean.upton@uniontrib.com wrote:
> 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
>
> _______________________________________________
> 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