Skip to content

Commit 2a19419

Browse files
committed
add configurable min documents to create indexes
1 parent aa0efd9 commit 2a19419

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

firebase-firestore/src/test/java/com/google/firebase/firestore/local/CountingQueryEngine.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ public void setRelativeIndexReadCostPerDocument(double newCost) {
102102
queryEngine.setRelativeIndexReadCostPerDocument(newCost);
103103
}
104104

105+
@Override
106+
public void setMinCollectionSizeToAutoCreateIndex(int newMin) {
107+
queryEngine.setMinCollectionSizeToAutoCreateIndex(newMin);
108+
}
109+
105110
/**
106111
* Returns the number of documents returned by the RemoteDocumentCache's `getAll()` API (since the
107112
* last call to `resetCounts()`)

firebase-firestore/src/test/java/com/google/firebase/firestore/local/LocalStoreTestCase.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ protected void setRelativeIndexReadCostPerDocument(double newCost) {
234234
queryEngine.setRelativeIndexReadCostPerDocument(newCost);
235235
}
236236

237+
protected void setMinCollectionSizeToAutoCreateIndex(int newMin) {
238+
queryEngine.setMinCollectionSizeToAutoCreateIndex(newMin);
239+
}
240+
237241
private void releaseTarget(int targetId) {
238242
localStore.releaseTarget(targetId);
239243
}

0 commit comments

Comments
 (0)