Skip to content

Commit dfca741

Browse files
committed
query_engine.test.ts: fixed build
1 parent 8d99691 commit dfca741

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/firestore/test/unit/local/query_engine.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ import {
7878

7979
import * as persistenceHelpers from './persistence_test_helpers';
8080
import { TestIndexManager } from './test_index_manager';
81+
import { FieldIndexManagementApiImpl } from '../../../src/index/field_index_management';
8182

8283
const TEST_TARGET_ID = 1;
8384

@@ -864,14 +865,18 @@ function genericQueryEngineTest(
864865
}
865866
await addDocument(...nonmatchingDocuments);
866867

867-
queryEngine.indexAutoCreationEnabled = config.indexAutoCreationEnabled;
868+
const fieldIndexManagementApi = new FieldIndexManagementApiImpl();
869+
queryEngine.fieldIndexManagementApi = fieldIndexManagementApi;
870+
871+
fieldIndexManagementApi.indexAutoCreationEnabled =
872+
config.indexAutoCreationEnabled;
868873

869874
if (config.indexAutoCreationMinCollectionSize !== undefined) {
870-
queryEngine.indexAutoCreationMinCollectionSize =
875+
fieldIndexManagementApi.indexAutoCreationMinCollectionSize =
871876
config.indexAutoCreationMinCollectionSize;
872877
}
873878
if (config.relativeIndexReadCostPerDocument !== undefined) {
874-
queryEngine.relativeIndexReadCostPerDocument =
879+
fieldIndexManagementApi.relativeIndexReadCostPerDocument =
875880
config.relativeIndexReadCostPerDocument;
876881
}
877882

0 commit comments

Comments
 (0)