Repoze.catalog

Latest version: v0.9.0

Safety actively analyzes 701645 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

0.6.0

==================

- N-Best ascending fieldindex sort was being chosen incorrectly when
there was no limit. Symptom: ``RuntimeError, 'n-best used without
limit'``.

0.5.9

==================

- Add ``reindex_doc`` method as an alias for ``index_doc`` to both
CatalogFieldIndex and CatalogKeywordIndex (for performance,
``index_doc`` for both indexes has special case code for reindexing).

0.5.8

==================

- Speed up path2 index attribute search by using __getitem__ rather
than .get in some places.

- Override textindex reindex_doc method: calling index_doc only
instead of calling unindex_doc and then index_doc is much more
efficient.

0.5.7

==================

- Attributes returned to attribute checker were not correct.

0.5.6

==================

- Add "attribute discriminator" and "attribute checker" support to
path2 index. If an index is created with an attribute
discriminator, when any object is indexed, the value of the
attribute will be stored in the path index. The path index will
know that that attribute belongs to a particular path. Later, when
the "attribute checker" feature of the ``apply`` or ``search``
method is used, a user-supplied attribute checker function will be
able to filter the result set returned by the index. This is used
by the author primarily to support security-filtered searches of a
path index. It is not otherwise documented.

0.5.5

==================

- Add a ``reindex_doc`` method to the catalog and to the ``common``
shared index base class. The catalog's ``reindex_doc`` calls each
index's ``reindex_doc`` method when called. The common shared index
base class implementation unindexes the docid and then subsequently
indexes the document using the docid. This method can be overridden
for specific indexes to do something different on a reindex.

- ``repoze.catalog.indexes.path2.CatalogPathIndex2`` now takes an
extra argument to its search method named ``include_path``. If this
is true, the docid set returned will include the docid for the path
specified by the path query parameter. The ``apply`` method of the
index allows for the specification of the ``include_path`` as a
dictionary member in an ``apply`` call which specifies the query as
a dictionary.

- Give ``path2.CatalogPathIndex2`` index a better ``reindex_doc``
method than the default.

- The CatalogKeywordIndex's ``apply`` method mutated the query passed
in if it was a dict. To fix, we override the ``apply`` method from
the zope.index implementation.

- Added a Range class importable as ``repoze.catalog.Range``. The
Range class should be used to represent a range query to a
CatalogFieldIndex. The old-style of passing a 2-tuple to represent
a range is still supported, but will be eventually removed in favor
of requring a Range object to represent a Range query. A Range
object can be instantiated ala "Range(start, end)".

- It is now possible to pass a sequence of items to the
CatalogFieldIndex ``apply`` method. When a sequence of terms that
is passed in is *not* a tuple with two items in it (the previous API
representing a range, which is deprecated), it will be considered a
query for multiple terms. The docids returned for each term will be
unioned together to form the result.

- It is now possible to pass a dictionary to the CatalogFieldIndex
``apply`` method. When a dictionary is passed, the member of the
dictionary named ``query`` is treated as the query. It may be a
single term, a sequence of terms, or a Range. An additional
dictionary member named ``operator`` may also be specified: when
this is specified, it must be one of ``or`` or ``and`` (the default
is ``or``). If the query specifies multiple terms, and the operator
is ``or``, the results will be unioned; if the query specifies
multiple terms and the operator is ``and``, the results will be
intersected.

Page 3 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.