PostgreSQL-backed catalog for Plone replacing ZCatalog BTrees indexes
Project description
plone.pgcatalog
PostgreSQL-backed catalog for Plone, replacing ZCatalog BTrees indexes with SQL queries on JSONB.
Requires zodb-pgjsonb as the ZODB storage backend.
Features
- All standard index types supported: FieldIndex, KeywordIndex, DateIndex, BooleanIndex, DateRangeIndex, UUIDIndex, ZCTextIndex, ExtendedPathIndex, GopipIndex
- DateRecurringIndex for recurring events (Plone's
start/endindexes) -- recurrence expansion at query time via rrule_plpgsql, no C extensions needed - Extensible via
IPGIndexTranslatornamed utilities for custom index types - Dynamic index discovery from ZCatalog at startup -- addons adding indexes via
catalog.xmljust work - Transactional writes -- catalog data written atomically alongside object state during ZODB commit
- Full-text search via PostgreSQL
tsvector/tsquery - Zero ZODB cache pressure -- no BTree/Bucket objects stored in ZODB
- Container-friendly -- works on standard
postgres:17Docker images, no extensions required
Requirements
- Python 3.12+
- PostgreSQL 14+ (tested with 17)
- zodb-pgjsonb
- Plone 6
Installation
pip install plone-pgcatalog
Add to your Zope configuration:
<!-- zope.conf -->
%import zodb_pgjsonb
<zodb_main>
<pgjsonb>
dsn dbname=mydb user=zodb password=zodb host=localhost port=5432
</pgjsonb>
</zodb_main>
Install the plone.pgcatalog:default GenericSetup profile through Plone's Add-on installer or your policy package.
Usage
Once installed, portal_catalog is replaced with PlonePGCatalogTool. All catalog queries use the same ZCatalog API:
# Standard catalog queries -- same syntax as ZCatalog
results = catalog(portal_type="Document", review_state="published")
results = catalog(Subject={"query": ["Python", "Plone"], "operator": "or"})
results = catalog(SearchableText="my search term")
results = catalog(path={"query": "/plone/folder", "depth": 1})
# Recurring events (DateRecurringIndex)
results = catalog(start={
"query": [DateTime("2025-03-01"), DateTime("2025-03-31")],
"range": "min:max",
})
Documentation
- ARCHITECTURE.md -- internal design, index registry, query translation, custom index types
- BENCHMARKS.md -- performance comparison vs RelStorage+ZCatalog
- CHANGES.md -- changelog
License
GPL-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plone_pgcatalog-1.0.0b2.tar.gz.
File metadata
- Download URL: plone_pgcatalog-1.0.0b2.tar.gz
- Upload date:
- Size: 116.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8c14d9bafc7ede3446cd6fbb8a8e34a556f365e406c98c22ea870ee86e37ab7
|
|
| MD5 |
d8f4df9d571c15aa98f6b8345b611f13
|
|
| BLAKE2b-256 |
819d58af59b694485d6d7a0a8034831098d7776bce50f6afc20cee2d29f8ac8f
|
Provenance
The following attestation bundles were made for plone_pgcatalog-1.0.0b2.tar.gz:
Publisher:
release.yaml on bluedynamics/plone-pgcatalog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plone_pgcatalog-1.0.0b2.tar.gz -
Subject digest:
f8c14d9bafc7ede3446cd6fbb8a8e34a556f365e406c98c22ea870ee86e37ab7 - Sigstore transparency entry: 952300375
- Sigstore integration time:
-
Permalink:
bluedynamics/plone-pgcatalog@d2a54401ffb31c5f3c0a529eee4e22e95de8ac3b -
Branch / Tag:
refs/tags/v1.0.0b2 - Owner: https://github.com/bluedynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@d2a54401ffb31c5f3c0a529eee4e22e95de8ac3b -
Trigger Event:
release
-
Statement type:
File details
Details for the file plone_pgcatalog-1.0.0b2-py3-none-any.whl.
File metadata
- Download URL: plone_pgcatalog-1.0.0b2-py3-none-any.whl
- Upload date:
- Size: 53.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b432bfb694ac4d39646d1ef54f4c9bddf8d851ed025b7013556b4864c0e48d9b
|
|
| MD5 |
8279583b244dd99367ad12fc11011a13
|
|
| BLAKE2b-256 |
5f13beccffc148632a4bc5f234b9c90b93036a1a410c845e73037ada3e501bb8
|
Provenance
The following attestation bundles were made for plone_pgcatalog-1.0.0b2-py3-none-any.whl:
Publisher:
release.yaml on bluedynamics/plone-pgcatalog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plone_pgcatalog-1.0.0b2-py3-none-any.whl -
Subject digest:
b432bfb694ac4d39646d1ef54f4c9bddf8d851ed025b7013556b4864c0e48d9b - Sigstore transparency entry: 952300376
- Sigstore integration time:
-
Permalink:
bluedynamics/plone-pgcatalog@d2a54401ffb31c5f3c0a529eee4e22e95de8ac3b -
Branch / Tag:
refs/tags/v1.0.0b2 - Owner: https://github.com/bluedynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@d2a54401ffb31c5f3c0a529eee4e22e95de8ac3b -
Trigger Event:
release
-
Statement type: