hi,

we use ZCatalogs as tables, to store data for rapid access and searching. Recently we added a keyword index to one table, and found that the metadata of the index is not updated, when a keyword is added.The name of the index and metadata is the same "registered_courses". I found in Catalog.py updateMetadata around line 306

        else:
            if data.get(index, 0) != newDataRecord:
                data[index] = newDataRecord

the if condition evaluates always to false, cause the data.get(index,0) accesses the data of the index and not of the metadata field as long as Zope was not restarted that worked fine. But after a restart the metadata field always only contained the first added keyword, the index
was still ok.
After I changed the above code to:

       else:
            if True or data.get(index, 0) != newDataRecord:
                data[index] = newDataRecord

It works as exspected.



--
Gruß Joachim

_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to