Hi all, I have a Zope db that contains several thousand documents all indexed in a single catalog. When I query this catalog in the ZMI, I get results, but when I query this catalog as an anonymous user through a dtml-method, no results are returned. The catalog in question is actually the portal_catalog from a CMF-1.3 and I am curious as to whether or not the allowedRolesAndUsers index is automatically referenced when querying the portal_catalog? Also, when I try and reindex some of the indices, I get a POS key error... Anyone have any thoughts on this? Thanks.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kevin Carlson wrote: | I have a Zope db that contains several thousand documents all indexed in | a single catalog. When I query this catalog in the ZMI, I get results, | but when I query this catalog as an anonymous user through a | dtml-method, no results are returned. The catalog in question is | actually the portal_catalog from a CMF-1.3 and I am curious as to | whether or not the allowedRolesAndUsers index is automatically | referenced when querying the portal_catalog? Yes, that is one of the design goals of the portal_catalog tool: users see only search results which they are allowed to view. If your content is all in a workflow state which does not permit anonymous access ("private" in the default workflow), then anonymous will not find any search results. | Also, when I try and reindex some of the indices, I get a POS key error... "POSKeyError" or "POSError -- Conflict"? The first one is Bad News (tm); it suggests that you have some cruft in the catalog, and may need to recover the ZODB. The second is "normal" -- you may need to stop other write activity while you do the reindexing. Tres. - -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCCQQQGqWXf00rNCgRAv2rAJ0UmyyUWVCpfsVBu44ZDnDAgJdgfACbByfo JuYi8/t/+lOce6VjB1DlElg= =XY4/ -----END PGP SIGNATURE-----
Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Kevin Carlson wrote:
"POSKeyError" or "POSError -- Conflict"? The first one is Bad News (tm); it suggests that you have some cruft in the catalog, and may need to recover the ZODB. The second is "normal" -- you may need to stop other write activity while you do the reindexing.
I ran fsrefs, fstest and fsrecover all of which finished with no issues. However, when I try to repopulate the catalog, or traverse objects in a BTreeFolder2, I am getting a POSKeyError. I have 12,940 objects stored in the BTreeFolder2 instance -- is there a practical limit to the number of objects one can store in one of these? If there is not a limit, does anyone have ideas on how I can "fix" the BTreeFolder2 since the fs* scripts don't seem to do the trick? Thanks, Kevin
From: "Kevin Carlson" <khcarlso@bellsouth.net>
Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Kevin Carlson wrote:
"POSKeyError" or "POSError -- Conflict"? The first one is Bad News (tm); it suggests that you have some cruft in the catalog, and may need to recover the ZODB. The second is "normal" -- you may need to stop other write activity while you do the reindexing.
I ran fsrefs, fstest and fsrecover all of which finished with no issues. However, when I try to repopulate the catalog, or traverse objects in a BTreeFolder2, I am getting a POSKeyError. I have 12,940 objects stored in the BTreeFolder2 instance -- is there a practical limit to the number of objects one can store in one of these?
We currently have about 1 million objects in a BTreeFolder2 and it is running without problem, so I don't think the number of entries is the issue. Jonathan
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kevin Carlson wrote: | I ran fsrefs, fstest and fsrecover all of which finished with no | issues. That is good news, actually, as it suggests that the problem is localized to the BTrees, which are usually reparable. | However, when I try to repopulate the catalog, or traverse | objects in a BTreeFolder2, I am getting a POSKeyError. I have 12,940 | objects stored in the BTreeFolder2 instance -- is there a practical | limit to the number of objects one can store in one of these? | | If there is not a limit, does anyone have ideas on how I can "fix" the | BTreeFolder2 since the fs* scripts don't seem to do the trick? Try creating a new BTree for the folder, and then copying items, e.g.: ~ >>> new_tree = folder._tree.__class__() ~ >>> for k, v in folder._tree.items(): ~ ... new_tree[k] = v ~ >>> folder._old_tree, folder._tree = folder._tree, tree ~ >>> get_transaction().commit() For the indexes, it might be easier just to delete each borked index, recreate it, and reindex it. Tres. - -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCCgZYGqWXf00rNCgRArOwAJ4lHfiJzD/mir4L4CKl6gAuaGGVngCfXaeR qRTdBjABs4LfEnKIM9UET3Q= =3hI8 -----END PGP SIGNATURE-----
--On Dienstag, 8. Februar 2005 13:17 Uhr -0500 Kevin Carlson <khcarlso@bellsouth.net> wrote:
Hi all,
I have a Zope db that contains several thousand documents all indexed in a single catalog. When I query this catalog in the ZMI, I get results, but when I query this catalog as an anonymous user through a dtml-method, no results are returned. The catalog in question is actually the portal_catalog from a CMF-1.3 and I am curious as to whether or not the allowedRolesAndUsers index is automatically referenced when querying the portal_catalog?
The implementation of searchResults() in the CMF CatalogTool will tell you :-) -aj
participants (4)
-
Andreas Jung -
Jonathan Hobbs -
Kevin Carlson -
Tres Seaver