[Zope] TextIndexNG QueryParser Difficulties

Andreas Jung Andreas Jung <andreas@andreas-jung.com>
Thu, 17 Apr 2003 18:56:02 +0200


--On Donnerstag, 17. April 2003 18:20 Uhr +0200 Oliver Bleutgen 
<myzope@gmx.net> wrote:

> Andreas Jung wrote:
>> This problem *should* be fixed in 1.09. But you need to recreate the
>> index. Btw. this problem is only of cosmetic nature since the core
>> functionality remains untouched.
>> This method is for testing purposes only.
>
> Just FYI, I have installed TextIndexNG (which is very nice) in a
> basically clean zope and have exactly the same problem. The only
> "speciality" is that this is in a PortalCatalog, not a ZCatalog.
>
> The error occurs in this line:
> self._v_catalog =
> self.getPhysicalRoot().unrestrictedTraverse(self.catalog_path)
>
> and an external method returning
> Indexes['content_ng'].catalog_path for an textindexNG
>
> gives me just
> 'portal_catalog', which is obviously not the real physical path to the
> catalog.

This indicates that the caller (the ZCatalog instance) returns
a wrong value for getPhyisicalPath(). In case of a CMF/Plonesite
the result should /site/portal_catalog. I pretty sure that the
the caller is an Acquisition wrapper that returns the wrong value.
Maybe it might help to modify the getPhysicalPath() call in __init__()
so that the unwrapped object is called instead of the wrapper (using 
aq_base() & friends):

-aj