[Zope-dev] [Ann] Zope 2.1.6 ZCatalog patches: "and not", "near"

Dieter Maurer dieter@handshake.de
Tue, 6 Jun 2000 18:50:21 +0200 (CEST)


Zope 2.1.6's ZCatalog contains a small bug in its handling
of "and not" searches.

  URL:http://www.handshake.de/~dieter/pyprojects/zope/andnot.pat

fixes this bug.


"near" searches do not work.
As Michel pointed out, the relevant indexes have been removed
for space considerations.
The patch at

  URL:http://www.handshake.de/~dieter/pyprojects/zope/near.pat

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.

The score function for near searches is currently very ad hoc
and should probably replaces by a more sensible function.


Dieter