Custom object IDs
You can choose which field is used as the object ID. The field should be unique and can be a string or integer. By default, we use thepk field of the model.
Python
Custom index name
You can customize the index name. By default, the index name will be the name of the model class.Python
Field preprocessing and related objects
If you want to process a field before indexing it, for example, capitalizing a contact’s name, or if you want to index an attribute of a related object, you need to define proxy methods for these fields.Models
Python
Index
Python
Contact using its Account names.
You can use the associated account_ids at search-time to fetch more data from your
model.
Only proxy the fields relevant for search to keep your records’ size as small as possible.
Index settings
You can configure your index, using all of Algolia’s index settings.Python
Restrict indexing to a subset of your data
You can add constraints controlling if a record must be indexed or not.should_index should be a callable that returns a boolean.
Python
Multiple indices per model
You can have several indices for a single model.1
Define the indices you want for a model
Python
2
Define a meta model to aggregate the indices
Python
3
Register index with the model
Register the
AlgoliaIndex with your Model:Python
Temporarily turn off the auto-indexing
To temporarily turn off the auto-indexing feature, use thedisable_auto_indexing context decorator:
Python