Skip to main content
This page documents an earlier version of the API client. For the latest version, see Upgrade.
The Kotlin API client follows semantic versioning.

Update to version 2

Version 2 of the library uses Ktor client version 2.

Ktor

Refer to Ktor’s migration guide.

LogLevel

The library uses its own LogLevel instead of Ktor’s Loglevel. Update your imports:
SubsystemVersion 1Version 2
LogLevelio.ktor.client.features.logging.LogLevelcom.algolia.search.logging.LogLevel

Public constants

Constants like KeyIndexName, KeyEnglish, and RouteIndexesV1 aren’t exposed anymore. Use your own constants instead. You can find the internal constants in the package: com.algolia.search.serialize.internal. This new version removes all deprecated methods and features from version 1.

Update with Android Studio or IntelliJ Idea

Go to your build.gradle or build.gradle.kts file and synchronize it. Check the line for com.algolia:algoliasearch-client-kotlin. If you see the warning β€œa newer version com.algolia:algoliasearch-client-kotlin than X is available: Y”, you can replace X by Y and re-build your project.

Update without Android Studio or IntelliJ Idea

Go to the latest release on GitHub and note its release number, for example, X.Y.Z. Go to your build.gradle or build.gradle.kts file, find the line with com.algolia:algoliasearch-client-kotlin, replace its version by X.Y.Z and build your project to upgrade.
⌘I