Upgrading the Django integration
Upgrading to v3
If you have been using AlgoliaSearch for Django v1 or v2, you can upgrade to v3 by running the following command:
1
pip install -U algoliasearch_django>=3.0
Version 3 includes these breaking changes:
1. Upgrade usage of Python API Client to 3.0.0
AlgoliaSearch for Django v3 depends on the newest release of the Python API client.
-
If you used AlgoliaSearch for Django v1 or v2 without directly using Python API client, you have nothing to do.
-
If you used AlgoliaSearch for Django v1 or v2 and you directly used the Python API client directly, you need to update your Python API client code.
2. Remove usage of deprecated method clear_index
The method clear_index
was removed and replaced by clear_objects
to match the names found in the newer version of the Python API client.
1
2
3
4
5
6
- from algoliasearch_django import clear_index
+ from algoliasearch_django import clear_objects
- clear_index(model)
+ clear_objects(model)