Algolia.Search package is version 7.
This page lists the breaking changes introduced since the previous major release, version 6.
Method changes overview
The following table has links for all methods and their replacementsSearch API client
| Version 6 (legacy) | Version 7 (current) | |
|---|---|---|
client.AddApiKey | → | client.AddApiKey |
client.AddApiKey.wait | → | client.WaitForApiKey |
DictionaryClient.ClearDictionaryEntries | → | client.BatchDictionaryEntries |
client.CopyIndex | → | client.OperationIndex |
client.CopyRules | → | client.OperationIndex |
client.CopySynonyms | → | client.OperationIndex |
client.DeleteApiKey | → | client.DeleteApiKey |
DictionaryClient.DeleteDictionaryEntries | → | client.BatchDictionaryEntries |
client.GenerateSecuredApiKey | → | client.GenerateSecuredApiKey |
client.GetApiKey | → | client.GetApiKey |
client.GetSecuredApiKeyRemainingValidity | → | client.GetSecuredApiKeyRemainingValidity |
client.ListApiKeys | → | client.ListApiKeys |
client.ListIndices | → | client.ListIndices |
client.MoveIndex | → | client.OperationIndex |
client.MultipleBatch | → | client.MultipleBatch |
client.MultipleQueries | → | client.Search |
DictionaryClient.ReplaceDictionaryEntries | → | client.BatchDictionaryEntries |
client.RestoreApiKey | → | client.RestoreApiKey |
DictionaryClient.SaveDictionaryEntries | → | client.BatchDictionaryEntries |
client.UpdateApiKey | → | client.UpdateApiKey |
index.Batch | → | client.Batch |
index.Browse | → | client.BrowseObjects |
index.BrowseRules | → | client.BrowseRules |
index.BrowseSynonyms | → | client.BrowseSynonyms |
index.ClearObjects | → | client.ClearObjects |
index.ClearRules | → | client.ClearRules |
index.ClearSynonyms | → | client.ClearSynonyms |
index.CopySettings | → | client.OperationIndex |
index.Delete | → | client.DeleteIndex |
index.DeleteBy | → | client.DeleteBy |
index.DeleteObject | → | client.DeleteObject |
index.DeleteObjects | → | client.DeleteObjects |
index.DeleteRule | → | client.DeleteRule |
index.DeleteSynonym | → | client.DeleteSynonym |
index.FindObject | → | client.SearchSingleIndex |
index.GetObject | → | client.GetObject |
index.GetObjects | → | client.GetObjects |
index.GetRule | → | client.GetRule |
index.GetSettings | → | client.GetSettings |
index.GetSynonym | → | client.GetSynonym |
index.GetTask | → | client.GetTask |
index.PartialUpdateObject | → | client.PartialUpdateObject |
index.PartialUpdateObjects | → | client.PartialUpdateObjects |
index.ReplaceAllObjects | → | client.ReplaceAllObjects |
index.ReplaceAllRules | → | client.SaveRules |
index.ReplaceAllSynonyms | → | client.SaveSynonyms |
index.SaveObject | → | client.SaveObject |
index.SaveObjects | → | client.SaveObjects |
index.SaveRule | → | client.SaveRule |
index.SaveRules | → | client.SaveRules |
index.SaveSynonym | → | client.SaveSynonym |
index.SaveSynonyms | → | client.SaveSynonyms |
index.Search | → | client.SearchSingleIndex |
index.SearchForFacetValues | → | client.SearchForFacetValues |
index.SearchRules | → | client.SearchRules |
index.SearchSynonyms | → | client.SearchSynonyms |
index.SetSettings | → | client.SetSettings |
index.{operation}.wait | → | client.WaitForTask |
Recommend API client
| Version 6 (legacy) | Version 7 (current) | |
|---|---|---|
client.GetFrequentlyBoughtTogether | → | client.GetRecommendations |
client.GetRecommendations | → | client.GetRecommendations |
client.GetRelatedProducts | → | client.GetRecommendations |
Removal of InitIndex
All methods are methods of a client instance.
The InitIndex method of the SearchClient class has been removed.
Instead, all methods require a indexName parameter.
C#
Wait for tasks
TheWait method has been removed.
Instead, use one of the following helpers:
WaitForTaskto wait until indexing operations are doneWaitForAppTaskto wait for application-level tasksWaitForApiKeyto wait for API key operations
Copy or move indices, settings, synonyms, or rules
Use theOperationIndex method,
which replaces the following methods:
CopyIndexMoveIndexCopyRulesCopySynonymsCopySettings
Serialization library
TheAlgolia.Search package no longer depends on the Newtonsoft.Json package to serialize the request and deserialize the response.
The API client uses .NET’s official System.Text.Json package.
If you were using the Newtonsoft.Json package for custom serialization,
see Migrate from Newtonsoft.Json to System.Text.Json
in Microsoft’s documentation.
Enumeration type serialization
To keep the serialization of enumeration types consistent with previous versions of the .NET API client, they’re serialized asint by default.
To serialize enumeration types as strings, use the JsonStringEnumConverter attribute from System.Text.Json.Serialization.
C#
MyProperty property will be serialized as string ("MyValue2) instead of an integer (1).