Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Introduction

CompositeIndex is a plugin index for the ZCatalog. Indexes containing more than one attribute to index an object are called “composite index”. Such indexes should be created if you expect to run queries that will have multiple attributes in the search phrase and all attributes combined will give significantly less hits than the any of the attributes alone. The key of a composite index is called “composite key” and is composed of two or more attributes of an object.

Catalog queries containing attributes managed by CompositeIndex are transparently catched and transformed into a CompositeIndex query (monkey patch). In particular, large sites with a combination of additional indexes (FieldIndex, KeywordIndex) and lots of content (>100k) will profit. The expected performance enhancement for catalog queries is about a factor of >2-3.

Statistics

Ratio of Calculation Time bet. Atomic- and Composite Index

Ratio of Calculation Time between Atomic- and Composite Index queries.

The plot shows that the performance of CompositeIndex increases significantly with increasing number of indexed objects (>1000 catalog entries) and with increasing number of combined attributes. The hit rate of the queries was about 6% for two combined attributes and 1% for three combined attributes of the total number of catalog entries. For uniform comparability, the ZODB cache was cleared before each query.

Usage

From the ZCatalog indexes tab, add an index of type CompositeIndex.

Id

pick any valid id you like

Composite key

names of attributes to concatenate

Example for Plone’s portal_catalog

Many catalog queries in plone are based on the combination of indexed attributes as follows: is_default_page, review_state, portal_type and allowedRolesAndUsers. Normally, the ZCatalog sequentially executes each corresponding atomic index and calculates intersection between each result. This strategy, in particular for large sites, decreases the performance of the catalog and simultaneously increases the volatility of ZODB’s object cache, because each index individually has a high number of hits whereas the the intersection between each index result has a low number of hits.

CompositeIndex overcomes this difficulty because it already contains a pre-calculateted intersection by means of its composite keys. The loading of large sets and the following expensive computation of the intersection is therefore obsolete.

Here we show a configuration example for plone. From the portal_catalog indexes tab, add a index of type CompositeIndex.

Id: comp01

Composite key: is_default_page,review_state,portal_type,allowedRolesAndUsers

Reindex the CompositeIndex “comp01”.

Now each query which contains two ore more components of the composite key is automatically transformed into a query on the CompositeIndex “comp01”.

Changelog

0.1 - rc1

  • Initial release

Metadata

Release files for unimr.compositeindex 0.1rc1-r84937

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unimr.compositeindex 0.1rc1-r84937
File Size Uploaded Provenance
unimr.compositeindex-0.1rc1-r84937.tar.gz 42.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for unimr.compositeindex 0.1rc1-r84937
File Interpreter ABI Platform
unimr.compositeindex-0.1rc1_r84937-py2.4.egg Legacy Egg format - - Details

Total release size: 71.9 kB

Release files / unimr.compositeindex-0.1rc1-r84937.tar.gz

Download URL unimr.compositeindex-0.1rc1-r84937.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
27b110d44d5468091fb4acb15f9aead72fd64153d80ab7b00c741c385c90f7df
BLAKE2b-256 checksum
How to use checksums
ce0781fb716289036570063c7c534f1b7e3b3a67d85b82e498b9762408e98ac8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / unimr.compositeindex-0.1rc1_r84937-py2.4.egg

Download URL unimr.compositeindex-0.1rc1_r84937-py2.4.egg
Size 29.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
acb14953b3bf641980723d6ac237531676062fe6ace2365c99e5d3e49f3ccb5c
BLAKE2b-256 checksum
How to use checksums
bab0733fa74d21f6f7334b2a2f0b22e37fad26c4926504ebc427bdba55dbf981
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for unimr.compositeindex 0.1rc1-r84937

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page