[Zope] ZCatalog uniqueValuesFor

Dieter Maurer dieter@handshake.de
Fri, 12 Jan 2001 23:46:14 +0100 (CET)


aZaZel writes:
 >  ... "uniqueValuesFor" not updated after modification ...
Almost surely a small bug in ZCatalog.

A field index is implemented as a mapping from values to
lists of documents.
"uniqueValuesFor" returns this mapping's "keys()".

When the field value of a document changes, this
document is removed from the corresponding list.
Obviously, a test is missing whether the result
is the empty list. If it is, the key should be deleted.

Probably, you can fix this yourself.
The code is in "SearchIndex.UnIndex".

If you fixed it, file a bug with patch report into the Collector.


Dieter