Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 858cb24

Browse files
author
Clément Le Provost
committed
[offline] Upgrade to Offline Core 1.0
1 parent c0d5e74 commit 858cb24

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

algoliasearch/build-offline.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ android {
4040
}
4141

4242
dependencies {
43-
offlineCompile "com.algolia:algoliasearch-offline-core-android:0.2"
43+
offlineCompile "com.algolia:algoliasearch-offline-core-android:1.0"
4444
}
4545

4646

algoliasearch/src/offline/java/com/algolia/search/saas/MirroredIndex.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import android.util.Log;
2828

2929
import com.algolia.search.offline.core.LocalIndex;
30-
import com.algolia.search.offline.core.SearchResults;
30+
import com.algolia.search.offline.core.Response;
3131

3232
import org.json.JSONArray;
3333
import org.json.JSONException;
@@ -488,7 +488,7 @@ public void run()
488488
String[] objectFilePaths = new String[objectFiles.size()];
489489
for (int i = 0; i < objectFiles.size(); ++i)
490490
objectFilePaths[i] = objectFiles.get(i).getAbsolutePath();
491-
int status = getLocalIndex().build(settingsFile.getAbsolutePath(), objectFilePaths, true /* clearIndex */);
491+
int status = getLocalIndex().build(settingsFile.getAbsolutePath(), objectFilePaths, true /* clearIndex */, null /* deletedObjectIDs */);
492492
if (status != 200) {
493493
throw new AlgoliaException("Build index failed", status);
494494
}
@@ -840,7 +840,7 @@ JSONObject run() throws AlgoliaException {
840840
private JSONObject _searchOffline(@NonNull Query query) throws AlgoliaException
841841
{
842842
try {
843-
SearchResults searchResults = getLocalIndex().search(query.build());
843+
Response searchResults = getLocalIndex().search(query.build());
844844
if (searchResults.getStatusCode() == 200) {
845845
String jsonString = new String(searchResults.getData(), "UTF-8");
846846
JSONObject json = new JSONObject(jsonString);
@@ -1068,7 +1068,7 @@ JSONObject run() throws AlgoliaException {
10681068
private JSONObject _browseMirror(@NonNull Query query) throws AlgoliaException
10691069
{
10701070
try {
1071-
SearchResults searchResults = getLocalIndex().browse(query.build());
1071+
Response searchResults = getLocalIndex().browse(query.build());
10721072
if (searchResults.getStatusCode() == 200) {
10731073
String jsonString = new String(searchResults.getData(), "UTF-8");
10741074
JSONObject json = new JSONObject(jsonString);

0 commit comments

Comments
 (0)