16
16
17
17
import static com .google .firebase .firestore .util .Assert .hardAssert ;
18
18
19
- import androidx .annotation .RestrictTo ;
20
19
import com .google .firebase .database .collection .ImmutableSortedMap ;
21
20
import com .google .firebase .database .collection .ImmutableSortedSet ;
22
21
import com .google .firebase .firestore .core .Query ;
@@ -74,11 +73,6 @@ public void initialize(LocalDocumentsView localDocumentsView, IndexManager index
74
73
this .initialized = true ;
75
74
}
76
75
77
- @ RestrictTo (RestrictTo .Scope .LIBRARY )
78
- public boolean getAutomaticIndexingEnabled () {
79
- return this .automaticIndexingEnabled ;
80
- }
81
-
82
76
public void setAutomaticIndexingEnabled (boolean isEnabled ) {
83
77
this .automaticIndexingEnabled = isEnabled ;
84
78
}
@@ -107,6 +101,7 @@ public ImmutableSortedMap<DocumentKey, Document> getDocumentsMatchingQuery(
107
101
return result ;
108
102
}
109
103
104
+ // TODO(csi): Auto experiment data.
110
105
private void CreateCacheIndices (Query query , QueryContext counter , int resultSize ) {
111
106
if (counter .getDocumentCount () > 2 * resultSize ) {
112
107
indexManager .createTargetIndices (query .toTarget ());
@@ -277,7 +272,7 @@ private ImmutableSortedMap<DocumentKey, Document> executeFullCollectionScan(
277
272
* been indexed.
278
273
*/
279
274
private ImmutableSortedMap <DocumentKey , Document > appendRemainingResults (
280
- Iterable <Document > indexedResults , Query query , IndexOffset offset , QueryContext counter ) {
275
+ Iterable <Document > indexedResults , Query query , IndexOffset offset ) {
281
276
// Retrieve all results for documents that were updated since the offset.
282
277
ImmutableSortedMap <DocumentKey , Document > remainingResults =
283
278
localDocumentsView .getDocumentsMatchingQuery (query , offset );
@@ -286,9 +281,4 @@ private ImmutableSortedMap<DocumentKey, Document> appendRemainingResults(
286
281
}
287
282
return remainingResults ;
288
283
}
289
-
290
- private ImmutableSortedMap <DocumentKey , Document > appendRemainingResults (
291
- Iterable <Document > indexedResults , Query query , IndexOffset offset ) {
292
- return appendRemainingResults (indexedResults , query , offset , new QueryContext ());
293
- }
294
284
}
0 commit comments