zopefoundation / Products.ZCatalog

Zope's indexing and search solution.
Other
5 stars 22 forks source link

ZCatalog (ZMI) tab "Catalog" #107

Closed georgpfolz closed 4 years ago

georgpfolz commented 4 years ago

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.

georgpfolz commented 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.

jugmac00 commented 4 years ago

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.

d-maurer commented 4 years ago

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.

georgpfolz commented 4 years ago

"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 in zopefoundation/Products.ZCatalog then zopefoundation/Zope. Ok, I'll do that

icemac commented 4 years ago

@georgpfolz Are there any open questions to this issue or cat it be closed?

d-maurer commented 4 years ago

@icemac In Products.ZCatalog a pull request ("https://github.com/zopefoundation/Products.ZCatalog/pull/104") is waiting for approval which would fix this issue.

dataflake commented 4 years ago

Moved the issue to the correct repo

d-maurer commented 4 years ago

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.

icemac commented 4 years ago

Claimed to be fixed by #104. So closing it here.