Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 8f80056

Browse files
committed
make QueryEnhancement internal. Test with geoDistance standalone function
1 parent e4e308e commit 8f80056

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/stages/Search.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public final class Search extends Stage {
5656
* perform matching of synonyms, misspellings, lemmatization, stemming.
5757
*/
5858
@BetaApi
59-
public static final class QueryEnhancement {
59+
@InternalApi
60+
static final class QueryEnhancement {
6061
final String protoString;
6162

6263
private QueryEnhancement(String protoString) {

google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineSearchTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
package com.google.cloud.firestore.it;
1818

1919
import static com.google.cloud.firestore.it.ITQueryTest.map;
20-
import static com.google.cloud.firestore.pipeline.expressions.Expression.documentMatches;
21-
import static com.google.cloud.firestore.pipeline.expressions.Expression.field;
22-
import static com.google.cloud.firestore.pipeline.expressions.Expression.score;
20+
import static com.google.cloud.firestore.pipeline.expressions.Expression.*;
2321
import static com.google.common.truth.Truth.assertThat;
2422
import static org.junit.Assume.assumeFalse;
2523

@@ -536,7 +534,7 @@ public void sort_byDistance() throws Exception {
536534
.collection(COLLECTION_NAME)
537535
.search(
538536
Search.withQuery(field("location").geoDistance(queryLocation).lessThanOrEqual(5600))
539-
.withSort(field("location").geoDistance(queryLocation).ascending()));
537+
.withSort(geoDistance("location", queryLocation).ascending()));
540538
// .withQueryEnhancement(Search.QueryEnhancement.DISABLED));
541539

542540
Pipeline.Snapshot snapshot = pipeline.execute().get();

0 commit comments

Comments
 (0)