Index class is a core abstraction that represents a collection of spaces, enabling you to query your data efficiently. An index organizes multiple spaces and their associated fields to create a unified querying interface.
Constructor
Create a new index with the specified configuration.Parameters
The space or list of spaces to include in the index. These define the vector
representations for your data.
The field or list of fields to be indexed. If not specified, all fields from
the spaces will be indexed.
Excludes fields from storage and query results.
A list of conditional interactions within a space that modify vector behavior
based on events or conditions.
Maximum age of events to be considered. Older events will be filtered out when
specified. Use this to implement time-based data retention.
Batch system only: Restricts how many events should be considered based on
their age. Does not apply to real-time systems.
Controls event contribution during aggregation. Must be between 0 and 1. -
Values closer to 0: Give more weight to stored event aggregates - Values
closer to 1: Give more weight to new events being added
Controls how much the final aggregated event vector influences the base
vector. Must be between 0 and 1. - Values closer to 0: Keep results closer
to the base vector - Values closer to 1: Make results more influenced by
aggregated events
Controls the time decay curve for event weights. - Higher values: Create
more gradual decay over time - Lower values: Create steeper decay curves
Example
Properties
non_nullable_fields
schemas
Methods
has_schema()
Check if a given schema is used as input to any of the index’s spaces.The schema object to check for presence in the index.
bool - True if the schema is found, False otherwise.