diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/local/QueryEngine.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/QueryEngine.java index ec89a5d9a93..2a8e6155a9d 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/local/QueryEngine.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/local/QueryEngine.java @@ -41,7 +41,7 @@ * the result set is equivalent across all implementations. * *

The Query engine will use indexed-based execution if a user has configured any index that can - * be used to execute query (via {@link FirebaseFirestore#setIndexConfiguation}). Otherwise, the + * be used to execute query (via {@link FirebaseFirestore#setIndexConfiguration}). Otherwise, the * engine will try to optimize the query by re-using a previously persisted query result. If that is * not possible, the query will be executed via a full collection scan. * @@ -86,8 +86,7 @@ public ImmutableSortedMap getDocumentsMatchingQuery( ImmutableSortedSet remoteKeys) { hardAssert(initialized, "initialize() not called"); - ImmutableSortedMap result = - performQueryUsingIndex(query, query.toTarget()); + ImmutableSortedMap result = performQueryUsingIndex(query); if (result != null) { return result; } @@ -104,13 +103,13 @@ public ImmutableSortedMap getDocumentsMatchingQuery( * Performs an indexed query that evaluates the query based on a collection's persisted index * values. Returns {@code null} if an index is not available. */ - private @Nullable ImmutableSortedMap performQueryUsingIndex( - Query query, Target target) { + private @Nullable ImmutableSortedMap performQueryUsingIndex(Query query) { if (query.matchesAllDocuments()) { // Don't use index queries that can be executed by scanning the collection. return null; } + Target target = query.toTarget(); IndexType indexType = indexManager.getIndexType(target); if (indexType.equals(IndexType.NONE)) {