[Zope] ZCTextIndex - prefix wildcards not supported?

Casey Duncan casey at zope.com
Mon Jun 21 10:12:00 EDT 2004


On Mon, 21 Jun 2004 09:49:00 -0400
"Small Business Services" <toolkit at magma.ca> wrote:

> Hi Casey,
> 
> I am trying to implement your suggestion of accessing the '_docwords'
> structure in an attempt to eliminate duplicate storage of data in the
> ZCatalog.
> 
> I have created a test external method to retrieve the _docwords entry
> for a specific object in an existing ZCatalog:
> 
> def jtmp(self):
>    res = self.Catalog({'id' : '1086793690.85'})
>    for item in res:
>       rid = item.data_record_id_
>    return
> self.Catalog.getIndex('all_searchable_text').getEntryForObject(rid)

Catalog is a ZCatalog instance, (not a Catalog instance) so it doesn't
have getIndex. One of these two should work:

idx = self.Catalog.Indexes['all_searchable_text']

or

idx = self.Catalog._catalog.getIndex('all_searchable_text')

hth,

-Casey




More information about the Zope mailing list