[Zope] Catalog without a Z

Andre Meyer andre.meyer at decis.nl
Mon Mar 8 07:10:27 EST 2004


Hi Chris

With the help of  Siegmund Fuhringer I managed to get this right, so far:

Yes, self._catalog is not necessary.

Items not being added to indices happened because the items lacked a 
method to deliver a value to the appripriate indices. This works now, 
but I have not seen this documented anywhere...

Non-HTML this time :-)

thanks to everyone!
best wishes
Andre

...and now for something completely related: searching...


Chris Withers wrote:

> Andre Meyer wrote:
>
>>         self._catalog = ZCatalog.*ZCatalog*('Catalog')
>
>
> storing this in self._catalog is pointless, don't do it...
>
>>         self._catalog.*addIndex*('path_index', 'PathIndex')
>>         self._catalog.*addIndex*('text_index', 'TextIndex')
>>         self._catalog.*addIndex*('field_index', 'FieldIndex')
>>         self._*setObject*('Catalog', self._catalog)
>
>
> Okay, CatalogAware should find this catalog if "Composers" are added 
> inside "Music Libraries", are they?
>
>>     ...
>>     def addItem(self, id, item):
>
>
> How are you calling this method? It doesn't feel right, and may be 
> what is causing CatalogAware's manage_afterAdd method not to get fired...
>
>>         self._catalog.*catalog_object*(item) # does not work yet !!!
>
>
> ...but this line should work, although you should access it as 
> "self.Catalog" once you've done what I suggested above...
>
>> Any ideas or examples? Your help is appreciated.
>
>
> Don't post HTML to a Non-HTML list for starters ;-)
>
> Chris
>






More information about the Zope mailing list