[Zope-dev] [Ann] Zope 2.1.6 ZCatalog patches: "and not", "near"
Wed, 07 Jun 2000 10:27:17 -0700
Dieter Maurer wrote:
> Zope 2.1.6's ZCatalog contains a small bug in its handling
> of "and not" searches.
> fixes this bug.
This has allready been fixed in the CVS; sorry Dieter. You came up with
the exact fix though, good work. When fixing bugs in Zope it's allways
best to go against the CVS since this is the baseline we will apply
> "near" searches do not work.
> As Michel pointed out, the relevant indexes have been removed
> for space considerations.
> The patch at
> enables "near" searches. Instead of saving a word position index,
> word positions are determined dynamically during near searches
> (by reading the relevant document part).
> Of cause, this is much slower than an index based search.
> Moreover, it works only for persistent objects.
> It does not work e.g. for LocalFS objects (for them "near" is
> equivalent to "and").
> For these reasons, you may not want to apply this patch.
This isn't why I don't want to apply this patch, but rather I think it
would be better to specialize TextIndex instead of modifying the
existing one and create a new type of index, like a PositionalTextIndex,
that works like a text index but uses your patches. Once again, I
recommend working off the CVS. If you can provide an index like this I
will work it into the ZCatalog, probably post 2.2.
Visit WikiCentral for the latest Zen: