{"id":24870,"library":"zope.index","title":"zope.index","description":"Provides index implementations (field, text, set, etc.) for use with cataloging systems. Version 8.1, requires Python 3.10+. Maintenance mode.","status":"maintenance","version":"8.1","language":"python","source_language":"en","source_url":"https://github.com/zopefoundation/zope.index","tags":["zope","catalog","index","maintenance","field","text"],"install":[{"cmd":"pip install zope.index","lang":"bash","label":"Latest release"}],"dependencies":[{"reason":"Core dependency for interface declarations.","package":"zope.interface","optional":false}],"imports":[{"note":"FieldIndex is in the field submodule, not top-level.","wrong":"from zope.index import FieldIndex","symbol":"FieldIndex","correct":"from zope.index.field import FieldIndex"},{"note":"TextIndex is in the text submodule.","wrong":"from zope.index import TextIndex","symbol":"TextIndex","correct":"from zope.index.text import TextIndex"},{"note":"SetIndex is in the set submodule.","wrong":"from zope.index import SetIndex","symbol":"SetIndex","correct":"from zope.index.set import SetIndex"}],"quickstart":{"code":"from zope.index.field import FieldIndex\nindex = FieldIndex()\nindex.index_object(1, 'value1')\nindex.index_object(2, 'value2')\nhits = index.search({'any_of': ('value1',)})\nprint(hits)\n# Result: {1: 1}","lang":"python","description":"Create a FieldIndex, index two objects, search for one."},"warnings":[{"fix":"Evaluate if you need full Zope catalog stack; many use cases can be replaced with plain dicts.","message":"zope.index is in maintenance mode. No new features likely. Consider alternatives if starting fresh.","severity":"deprecated","affected_versions":">=8.0"},{"fix":"Call index.updateIndex() after batch indexing operations to flush changes.","message":"After indexing, you must explicitly apply pending updates via index.updateIndex() for some index types (e.g., SetIndex) before search works.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'3.10':18 '8.1':15 'catalog':12,22 'etc':8 'field':5,25 'implement':4 'index':3,23 'mainten':19,24 'mode':20 'provid':2 'python':17 'requir':16 'set':7 'system':13 'text':6,26 'use':10 'version':14 'zope':21 'zope.index':1","created_at":"2026-05-01T08:15:21.230621+00:00","updated_at":"2026-05-01T08:15:21.230621+00:00","problems":[{"fix":"Use 'from zope.index.field import FieldIndex'","cause":"Importing from top-level instead of submodule.","error":"AttributeError: module 'zope.index' has no attribute 'FieldIndex'"},{"fix":"Check that the interface attribute exists and matches the name expected by the index.","cause":"Incorrect interface passed to index constructor (e.g., fieldname wrong).","error":"zope.interface.interface.InvalidInterface: '...' is not a valid interface"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/zopefoundation/zope.index","docs":"https://zopeindex.readthedocs.io","changelog":"https://github.com/zopefoundation/zope.index/blob/master/CHANGES.rst","pypi":"https://pypi.org/project/zope.index/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}