Skip to main content

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

Project description

Overview

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.)

Changes

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 = filter.family.IF.Set(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 zope3-users@zope.org or zope-dev@zope.org 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zope.index-3.5.1.tar.gz (51.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

zope.index-3.5.1-py2.5.egg (160.1 kB view details)

Uploaded Egg

zope.index-3.5.1-py2.4.egg (162.3 kB view details)

Uploaded Egg

File details

Details for the file zope.index-3.5.1.tar.gz.

File metadata

  • Download URL: zope.index-3.5.1.tar.gz
  • Upload date:
  • Size: 51.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zope.index-3.5.1.tar.gz
Algorithm Hash digest
SHA256 cbf3412a8af8e29c4d992db04988c086b20fe48d356d77e5e7c1251f651654a4
MD5 e913e8dd91cc115d003041d0d6aa11e1
BLAKE2b-256 9eb8ca7e62fb4e0b22de9ab03ed8caa3bdfb38a7350cb7f4ff65e2fb3d68aab1

See more details on using hashes here.

File details

Details for the file zope.index-3.5.1-py2.5.egg.

File metadata

  • Download URL: zope.index-3.5.1-py2.5.egg
  • Upload date:
  • Size: 160.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zope.index-3.5.1-py2.5.egg
Algorithm Hash digest
SHA256 7deae4d3e312e4eb4d0fe551f2c973dc08bce200b89f741a370bfd49161cc78b
MD5 2f39e212f36e6e20afccd2c789d13856
BLAKE2b-256 961df488ba0d6c7547ea10efd3770ae8f9d4f7fefcf0792290c694294d38a31b

See more details on using hashes here.

File details

Details for the file zope.index-3.5.1-py2.4.egg.

File metadata

  • Download URL: zope.index-3.5.1-py2.4.egg
  • Upload date:
  • Size: 162.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zope.index-3.5.1-py2.4.egg
Algorithm Hash digest
SHA256 8ebc639f8c2046e5fa57dd59bb1c606763017b1ae8a3c56fdf0540ea7e831cd3
MD5 ff2459262126758091753bf1c4d8ca4e
BLAKE2b-256 57e36448ece3feed470dfbd8a81d13836cccd3ee218d2f36e87336006375b3b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page