Skip to main content

Index Types Module

The index module provides different indexing strategies for document retrieval.

Quick Start

Index Types

IndexType Enum

Type Comparison

Classes

IndexStats

Statistics about an index.

IndexProtocol

Protocol for index implementations.

KeywordIndex

Built-in BM25 keyword index (no external dependencies).

IndexRegistry

Registry for managing index implementations.

Using with Knowledge

Creating Custom Indices

Performance

  • KeywordIndex uses pure Python BM25 implementation
  • No external dependencies for keyword indexing
  • Vector indices require embedding models (lazy-loaded)