Sep 20, 2024
Upgrade the Scala API clients to v2
The latest major version of the algoliasearch-scala
package is v2.
This page lists the breaking changes since the last release, v1.
Client imports
The imports for the API clients changed.
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Search API
import algoliasearch.api.SearchClient
// Recommend API
import algoliasearch.api.RecommendClient
// A/B testing API
import algoliasearch.api.AbtestingClient
// Analytics API
import algoliasearch.api.AnalyticsClient
// Ingestion API
import algoliasearch.api.IngestionClient
// Insights API
import algoliasearch.api.InsightsClient
// Monitoring API
import algoliasearch.api.MonitoringClient
// Personalization API
import algoliasearch.api.PersonalizationClient
// Query Suggestions API
import algoliasearch.api.QuerySuggestionsClient
// Usage API
import algoliasearch.api.UsageClient
No domain-specific language
All operations are methods of the SearchClient
class.
The domain-specific language used in v1 has been removed.
Wait for tasks
The wait
method has been removed.
Instead, use one of the following helpers:
waitTask
to wait until indexing operations are donewaitAppTask
to wait for application-level taskswaitApiKeyCreation
to wait until an API key is createdwaitApiKeyUpdate
to wait until an API key is updatedwaitApiKeyDelete
to wait until an API key is deleted
Copy or moving indices, settings, synonyms, or rules
Use the operationIndex
method,
which replaces the following methods:
copyIndex
moveIndex
copyRules
copySynonyms
copySettings
Did you find this page helpful?