Closed georgpfolz closed 4 years ago
By the way, how can I search for all objects in a ZCatalog, without any filter? It used to work with context.myZCatalog()
but now I get 0 results.
I use the getAllBrains
method of a catalog to get all entries.
This was introduced as searchResults
previously returned all results, but because of reasons, this was changed to the opposite, and now, without any filter, returns zero results.
Georg Pfolz wrote at 2020-5-5 06:04 -0700:
I ran into some ZCatalog problems updating a Python 2 ZODB to Python 3 (on Zope 4.2.1), so I wanted to test the basic functionality of ZCatalog: I used to populate the ZCatalog with the tab "Find Objects" in the ZMI, so that's what I tried first. The update "worked":
Catalog Updated Total time: 0.0002162456512451172 Total CPU time: 0.00021599999999999397 (2020-05-05 15:01)
followed by
There are no objects in the Catalog.
Of course there were objects to catalog in the catalog's path. I then created an index and some Metadata and tried again, same result. I then tried it in a Python 2 instance (also Zope 4.2.1), with the same result.
What am I missing?
Likely, I did not understand what you have done.
"Update catalog" does not add new objects to the catalog. It removes objects from the catalog which no longer exist and rebuilds the metadata and indexes.
The "Find" tab should find objects and catalog them. When I remember right, I have seen related problem reports but they should be resolved in the meantime.
By the way: ZVatalog
related problems are better
discussed in zopefoundation/Products.ZCatalog
then
zopefoundation/Zope
.
"Update catalog" does not add new objects to the catalog. It removes objects from the catalog which no longer exist and rebuilds the metadata and indexes. I know, that's not what I did, as stated I used the "Find Objects" tab to populate the Catalog. At first I thought it doesn't work at all and that's why I opened the issue. Only later did I realize that it worked, it only shows the wrong result ("There are no objects in the Catalog.") after the search and then in the "Catalog" tab, so I changed the title and commentary of this issue.
By the way:
ZVatalog
related problems are better discussed inzopefoundation/Products.ZCatalog
thenzopefoundation/Zope
. Ok, I'll do that
@georgpfolz Are there any open questions to this issue or cat it be closed?
@icemac In Products.ZCatalog
a pull request ("https://github.com/zopefoundation/Products.ZCatalog/pull/104") is waiting for approval which would fix this issue.
Moved the issue to the correct repo
Georg Pfolz wrote at 2020-6-18 08:41 -0700:
I ran into some ZCatalog problems updating a Python 2 ZODB to Python 3 (on Zope 4.2.1), so I wanted to test the basic functionality of ZCatalog: I used to populate the ZCatalog with the tab "Find Objects" in the ZMI, so that's what I tried first. The update "worked":
Catalog Updated Total time: 0.0002162456512451172 Total CPU time: 0.00021599999999999397 (2020-05-05 15:01)
followed by
There are no objects in the Catalog.
Of course there were objects to catalog in the catalog's path. I then created an index and some Metadata and tried again: in the "Index" tab I can see some indexes, so there are elements in the Catalog, but nothing is shown in the "Catalog" tab:
There are no objects in the Catalog.
This problem is known -- it affects catalogs without index named "path".
There is a pull request to fix the problem -- waiting to be approved.
Claimed to be fixed by #104. So closing it here.
I ran into some ZCatalog problems updating a Python 2 ZODB to Python 3 (on Zope 4.2.1), so I wanted to test the basic functionality of ZCatalog: I used to populate the ZCatalog with the tab "Find Objects" in the ZMI, so that's what I tried first. The update "worked":
followed by
There are no objects in the Catalog.
Of course there were objects to catalog in the catalog's path. I then created an index and some Metadata and tried again: in the "Index" tab I can see some indexes, so there are elements in the Catalog, but nothing is shown in the "Catalog" tab:
There are no objects in the Catalog.