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.6.3 (2011-12-03)

  • KeywordIndex: Minor optimization; use __nonzero__ instead of __len__ to avoid loading the full TreeSet.

3.6.2 (2011-12-03)

  • KeywordIndex: Store docids in TreeSet rather than a Set when the number of documents matching a word reaches a configurable threshold (default 64). The rule is applied to individual words at indexing time, but you can call the new optimize method to optimize all the words in an index at once. Designed to fix LP #881950.

3.6.1 (2010-07-08)

  • TextIndex: reuse the lexicon from the underlying Okapi / Cosine index, if passed. (LP #232516)

  • Lexicon: avoid raising an exception when indexing None. (LP #598776)

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 = 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.6.3.tar.gz (63.3 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.6.3.win-amd64-py2.7.exe (325.6 kB view details)

Uploaded Source

zope.index-3.6.3.win-amd64-py2.6.exe (325.6 kB view details)

Uploaded Source

zope.index-3.6.3.win32-py2.7.exe (298.1 kB view details)

Uploaded Source

zope.index-3.6.3.win32-py2.6.exe (298.1 kB view details)

Uploaded Source

zope.index-3.6.3-py2.7-win-amd64.egg (203.1 kB view details)

Uploaded Egg

zope.index-3.6.3-py2.7-win32.egg (203.0 kB view details)

Uploaded Egg

zope.index-3.6.3-py2.6-win-amd64.egg (203.7 kB view details)

Uploaded Egg

zope.index-3.6.3-py2.6-win32.egg (203.6 kB view details)

Uploaded Egg

zope.index-3.6.3-py2.5-win32.egg (203.2 kB view details)

Uploaded Egg

zope.index-3.6.3-py2.4-win32.egg (205.2 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for zope.index-3.6.3.tar.gz
Algorithm Hash digest
SHA256 761590e377e7e763f10a2aa9f7b978129205e35c1bd6c2a4d308a75dd6bba475
MD5 c85a09f5d7e1d58bddbdc597c0a1ee1d
BLAKE2b-256 46dac2a47cb2316264420797216c99d9f2320d220359bf5a375aea3f47463aca

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3.win-amd64-py2.7.exe.

File metadata

File hashes

Hashes for zope.index-3.6.3.win-amd64-py2.7.exe
Algorithm Hash digest
SHA256 26ff8def44acd492279d5db7897dd838b2c5b0e8f68343d3ebfaa6dd17f79ec0
MD5 4998f9d2870fdf568a991a371f91503d
BLAKE2b-256 5892b2489e193b6088eb748f715d8a46deeab54c7b48d1b923c06170551a9fa9

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3.win-amd64-py2.6.exe.

File metadata

File hashes

Hashes for zope.index-3.6.3.win-amd64-py2.6.exe
Algorithm Hash digest
SHA256 d27ebe46590e7814f8d2791049c7399e079bf5ef92b0e606428d6094f13e9b24
MD5 bb367f265828051b5a30d4141d187ec6
BLAKE2b-256 ff192823cf5e392585a93285fcecfdb97bf7d2339694fc92629a126929b7fddd

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3.win32-py2.7.exe.

File metadata

File hashes

Hashes for zope.index-3.6.3.win32-py2.7.exe
Algorithm Hash digest
SHA256 7d00bb1f0effadf9f34299baa04a6bd68ff8f705909fc926f970b9404819f0be
MD5 016f17366f49366d8d25f44512323b6b
BLAKE2b-256 a752f8d89a73800f1b3f4450e9b1cc5a049e371507e5e38b4b50c84efc246ee6

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3.win32-py2.6.exe.

File metadata

File hashes

Hashes for zope.index-3.6.3.win32-py2.6.exe
Algorithm Hash digest
SHA256 2fcfc8593183e52d211092dc7f7fea83f8b264c6aa091a28c2cfc1b574f64bf2
MD5 64e3afc3f90e9ebfa2a8838f4b8eaa61
BLAKE2b-256 b948310f77c24dd69979de738e6cee9bb0913a5a18c93677ee6f6c843fd9af55

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3-py2.7-win-amd64.egg.

File metadata

File hashes

Hashes for zope.index-3.6.3-py2.7-win-amd64.egg
Algorithm Hash digest
SHA256 7d5df4361dd7825e012eceb3dd0bfc387bb4fe94fbedf625f73fe94d65fc8e3c
MD5 0ab13513e93d1b05ef87bf0438856b7e
BLAKE2b-256 b78b5ee537f911bd1d8f8227236fc82176b9ae38e1a014cc149a1523cc0e82a8

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3-py2.7-win32.egg.

File metadata

File hashes

Hashes for zope.index-3.6.3-py2.7-win32.egg
Algorithm Hash digest
SHA256 0a7003b179092b001d82a43539622e8fbd67da24caa0d09b686d3b2d486c2f1e
MD5 9b77117a96e6a0e0b01bb32dc8835561
BLAKE2b-256 6b11f23fa3499b7d32af9887d0f6f89131ec14eb0defeca4e6664b44d3b1f04c

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3-py2.6-win-amd64.egg.

File metadata

File hashes

Hashes for zope.index-3.6.3-py2.6-win-amd64.egg
Algorithm Hash digest
SHA256 549279b0f7bcd751198a5cbcd767b331da1bab892445607e429f4a279aabc963
MD5 06d7ba5cdfca78151a008e3b11363488
BLAKE2b-256 695d69bca29cafd187fff01a0ea985eab2ca9f70a59e85cfb1e535779c1d287d

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3-py2.6-win32.egg.

File metadata

File hashes

Hashes for zope.index-3.6.3-py2.6-win32.egg
Algorithm Hash digest
SHA256 b415222c4a2aa4b05c28d651cafbe194ca00efd488871bd346a55b8e647f3a0e
MD5 fc00a876708137d4c2adb91c21b7e3b0
BLAKE2b-256 d8f2594524f72a99f30abad40dd19b0171d2ea3cad89bdc53cc47976440037c4

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3-py2.5-win32.egg.

File metadata

File hashes

Hashes for zope.index-3.6.3-py2.5-win32.egg
Algorithm Hash digest
SHA256 1cb6189289a0e62d4be979d88d1b2b4740d18514a6f4d3b424548811ad9d8c10
MD5 6148448c01660f4e86660ab89e49ae28
BLAKE2b-256 e504ea1639b16862a633b35f85c1e40e7a1f8ad5626c18b88a59526a1bdfd95a

See more details on using hashes here.

File details

Details for the file zope.index-3.6.3-py2.4-win32.egg.

File metadata

File hashes

Hashes for zope.index-3.6.3-py2.4-win32.egg
Algorithm Hash digest
SHA256 db3daa861cc593a152762a12d9fc2260506aa0ddd43fb1612719d2daa22864b2
MD5 3a5d03efcaf81808749b53a9b0b18671
BLAKE2b-256 e8e3dfdf646b5e454159b61fbc0f2e01d830fea2d5076c14344e20e1a0247581

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