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

Commit 091008a

Browse files
committed
fix: rename getIndexName to getRawIndexName in the offline flavor
1 parent edcb8e9 commit 091008a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public void setDelayBetweenSyncs(long duration, @NonNull TimeUnit unit) {
306306
private synchronized void ensureLocalIndex()
307307
{
308308
if (localIndex == null) {
309-
localIndex = new LocalIndex(getClient().getRootDataDir().getAbsolutePath(), getClient().getApplicationID(), getIndexName());
309+
localIndex = new LocalIndex(getClient().getRootDataDir().getAbsolutePath(), getClient().getApplicationID(), getRawIndexName());
310310
}
311311
}
312312

@@ -322,7 +322,7 @@ protected LocalIndex getLocalIndex() {
322322

323323
private File getDataDir()
324324
{
325-
return new File(new File(getClient().getRootDataDir(), getClient().getApplicationID()), getIndexName());
325+
return new File(new File(getClient().getRootDataDir(), getClient().getApplicationID()), getRawIndexName());
326326
}
327327

328328
private File getSettingsFile()
@@ -1201,7 +1201,7 @@ private JSONObject _multipleQueriesOffline(@NonNull List<Query> queries, String
12011201
if (!mirrored) {
12021202
throw new IllegalStateException("Cannot run offline search on a non-mirrored index");
12031203
}
1204-
return new MultipleQueryEmulator(this.getIndexName()) {
1204+
return new MultipleQueryEmulator(this.getRawIndexName()) {
12051205
@Override
12061206
protected JSONObject singleQuery(@NonNull Query query) throws AlgoliaException {
12071207
return _searchOffline(query);

algoliasearch/src/testOffline/java/com/algolia/search/saas/MirroredIndexTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ interface SyncCompletionHandler {
111111

112112
private void populate(final @NonNull MirroredIndex index, final @NonNull SyncCompletionHandler completionHandler) {
113113
// Delete the index.
114-
client.deleteIndexAsync(index.getIndexName(), new AssertCompletionHandler() {
114+
client.deleteIndexAsync(index.getRawIndexName(), new AssertCompletionHandler() {
115115
@Override
116116
public void doRequestCompleted(JSONObject content, AlgoliaException error) {
117117
assertNull(error);

0 commit comments

Comments
 (0)