skip to navigation
skip to content

zope.index 3.6.0

Indices for using with catalog like text, field, etc.

Latest Version: 4.3.0


The zope.index package provides several indices for the Zope catalog. These include:

  • a field index (for indexing orderable values),
  • a keyword index,
  • a topic index,
  • a text index (with support for lexicon, splitter, normalizer, etc.)


3.6.0 (2009-08-03)

  • Improved test readability and reached 100% test coverage.
  • Fixed a broken optimization in okascore.c: it was passing a Python float to the PyInt_AS_LONG() macro. This resulted in wrong scores, especially on 64 bit platforms, where all scores typically ended up being zero.
  • Changed okascore.c to produce the same results as its Python equivalent, reducing the brittleness of the text index tests.

3.5.2 (2009-06-09)

  • Port okascore.c optimization used in okapiiindex from Zope2 catalog implementation. This module is compiled conditionally, based on whether your environment has a working C compiler.
  • Don’t use len(self._docweight) in okapiindex _search_wids method (obtaining the length of a BTree is very expensive at scale). Instead use self.documentCount(). Also a Zope2 port.

3.5.1 (2009-02-27)

  • The baseindex, okapiindex, and lexicon used plain counters for various lengths, which is unsuitable for production applications. Backport code from Zope2 indexes which opportunistically replaces the counters with BTree.Length objects.
  • Backport non-insane version of baseindex._del_wordinfo from Zope2 text index. This improves deletion performance by several orders of magnitude.
  • Don’t modify given query dictionary in the KeywordIndex.apply method.
  • Move FieldIndex’s sorting functionality to a mixin class so it can be reused by zc.catalog’s ValueIndex.

3.5.0 (2008-12-30)

  • Remove zope.testing from dependencies, as it’s not really needed.

  • Define IIndexSort interface for indexes that support sorting.

  • Implement sorting for FieldIndex (adapted from repoze.catalog/ZCatalog).

  • Add an apply method for KeywordIndex/TopicIndex, making them implement IIndexSearch that can be useful in catalog.

  • Optimize the search method of KeywordIndex/TopicIndex by using multiunion for the or operator and sorting before intersection for and.

  • IMPORTANT: KeywordIndex/TopicIndex now use IFSets instead of IISets. This makes it more compatible with other indexes (for example, when using in catalog). This change can lead to problems, if your code somehow depends on the II nature of sets, as it was before.

    Also, FilteredSets used to use IFSets as well, if you have any FilteredSets pickled in the database, you need to migrate them to IFSets yourself. You can do it like that:

    filter._ids =

    Where filter is an instance of FilteredSet.

  • IMPORTANT: KeywordIndex are now non-normalizing. Because it can be useful for non-string keywords, where case-normalizing doesn’t make any sense. Instead, it provides the normalize method that can be overriden by subclasses to provide some normalization.

    The CaseInsensitiveKeywordIndex class is now provided that do case-normalization for string-based keywords. The old CaseSensitiveKeywordIndex is gone, applications should use KeywordIndex for that.

Looks like the KeywordIndex/TopicIndex was sort of abadonware and wasn’t used by application developers, so after some discussion we decided to refactor them to make them more usable, optimal and compatible with other indexes and catalog.

Porting application from old KeywordIndex/TopicIndex to new ones are rather easy and explained above, so we believe that it isn’t a problem. Please, use or mailing lists, if you have any problems with migration.

Thanks Chris McDonough of repoze for supporting and useful code.

3.4.1 (2007-09-28)

  • Fixed bug in package metadata (wrong homepage URL).

3.4.0 (2007-09-28)

No further changes since 3.4.0a1.

3.4.0a1 (2007-04-22)

Initial release as a separate project, corresponds to zope.index from Zope 3.4.0a1

File Type Py Version Uploaded on Size
zope.index-3.6.0-py2.4-win32.egg (md5)
built on Windows-2003Server
Python Egg 2.4 2010-06-18 201KB
zope.index-3.6.0-py2.5-win32.egg (md5) Python Egg 2.5 2010-06-18 199KB
zope.index-3.6.0-py2.6-win-amd64.egg (md5) Python Egg 2.6 2010-03-09 199KB
zope.index-3.6.0-py2.6-win32.egg (md5) Python Egg 2.6 2010-03-09 199KB
zope.index-3.6.0-py2.7-win-amd64.egg (md5) Python Egg 2.7 2010-10-08 199KB
zope.index-3.6.0-py2.7-win32.egg (md5) Python Egg 2.7 2010-10-08 199KB
zope.index-3.6.0.tar.gz (md5) Source 2009-08-04 61KB (md5) MS Windows installer 2.6 2013-03-07 317KB (md5) MS Windows installer 2.7 2013-03-07 317KB
zope.index-3.6.0.win32-py2.6.exe (md5) MS Windows installer 2.6 2013-03-07 290KB
zope.index-3.6.0.win32-py2.7.exe (md5) MS Windows installer 2.7 2013-03-07 290KB
  • Author: Zope Corporation and Contributors
  • Home Page:
  • License: ZPL 2.1
  • Package Index Owner: baijum, J1m, ctheune, srichter, philikon, projekt01, fdrake, ignas, chrism, benji, mgedmin, ccomb, pcardune, hathawsh, faassen, nadako, chrisw, hannosch, tseaver, icemac, gary, roymath, tlotze, agroszer, menesis, davisagli, jamadden
  • Package Index Maintainer: zope.wineggbuilder, zope.wheelbuilder
  • DOAP record: zope.index-3.6.0.xml