Migrate from 2.x to 3.x
June 14, 2024 ยท View on GitHub
The library version 2.0 uses Kotlin version 1.6 and Algolia Kotlin API Client 2.0. Below are the steps to migrate.
This new version removes all deprecated methods and features from
v1.
Table of Contents
InstantSearch Android Package
InstantSearch Android package has changed. Please update your imports accordingly:
| Module | 2.x | 3.x |
|---|---|---|
| InstantSearch Android | com.algolia.instantsearch.helper.android | com.algolia.instantsearch.android |
Kotlin API Client
Kotlin API client (and its underlying Ktor client) is part of the library's binary interface. Please follow its migration guide, or apply the following changes:
LogLevel
The library uses LogLevel from the Kotlin API client instead of Ktor's Loglevel:
| Subsystem | 2.x | 3.x |
|---|---|---|
| Loglevel | io.ktor.client.features.logging.LogLevel | com.algolia.search.logging.LogLevel |
Public constants
Constants (e.g. KeyIndexName, KeyEnglish and RouteIndexesV1) are not exposed anymore. Please use your constants
instead.
Ktor client
Refer to Ktor's migration guide.
Searchers
Legacy searchers are removed; please migrate as follows:
| Searcher | 2.x | 3.x |
|---|---|---|
| Single Index Searcher | SearcherSingleIndex | HitsSearcher |
| Facets Searcher | SearcherForFacets | FacetsSearcher |
| Multi Index Searcher | SearcherMultipleIndex | MultiSearcher |
Extension modules
Multiple extensions have been extracted to modules:
| Subsystem | Module |
|---|---|
| Androidx SwipeRefreshLayout | com.algolia:instantsearch-android-loading |
| Androidx Paging 3 | com.algolia:instantsearch-android-paging3 |
| Androidx Paging 2 | Removed |