From 3c70bb2341b052d4c1c39c5ace53045dfd9ba4a0 Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Wed, 8 Apr 2026 11:40:15 -0600 Subject: [PATCH 1/2] chore: remove snippet from the public api for the initial release --- .../cloud/firestore/pipeline/expressions/Expression.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java index a2250a565..42e9a2d70 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java @@ -4375,7 +4375,9 @@ public static Expression score() { * @param rquery Define the search query using the search domain-specific language (DSL). * @return A new {@link Expression} representing the snippet operation. */ - public static Expression snippet(String fieldName, String rquery) { + @BetaApi + @InternalApi + static Expression snippet(String fieldName, String rquery) { return new FunctionExpression( "snippet", java.util.Arrays.asList(field(fieldName), constant(rquery))); } @@ -4397,7 +4399,9 @@ public static Expression snippet(String fieldName, String rquery) { * @param rquery Define the search query using the search domain-specific language (DSL). * @return A new {@link Expression} representing the snippet operation. */ - public final Expression snippet(String rquery) { + @BetaApi + @InternalApi + final Expression snippet(String rquery) { return new FunctionExpression( "snippet", java.util.Arrays.asList(this, constant(rquery)), From cd9601746fefc87f5e47b36ff2445d1fba251af2 Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Wed, 8 Apr 2026 11:52:29 -0600 Subject: [PATCH 2/2] Re-add BetaApi label to expressions that are part of search --- .../cloud/firestore/pipeline/expressions/Expression.java | 4 ++++ .../google/cloud/firestore/pipeline/expressions/Field.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java index 42e9a2d70..c8e2c6a7f 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java @@ -16,6 +16,7 @@ package com.google.cloud.firestore.pipeline.expressions; +import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.cloud.Timestamp; import com.google.cloud.firestore.Blob; @@ -4282,6 +4283,7 @@ public static Expression geoDistance(String fieldName, GeoPoint location) { * @param location Compute distance to this {@link GeoPoint}. * @return A new {@link Expression} representing the geoDistance operation. */ + @BetaApi public static Expression geoDistance(Field field, GeoPoint location) { return new FunctionExpression( "geo_distance", java.util.Arrays.asList(field, constant(location))); @@ -4301,6 +4303,7 @@ public static Expression geoDistance(Field field, GeoPoint location) { * @param rquery Define the search query using the search domain-specific language (DSL). * @return A new {@link BooleanExpression} representing the documentMatches operation. */ + @BetaApi public static BooleanExpression documentMatches(String rquery) { return new BooleanFunctionExpression("document_matches", constant(rquery)); } @@ -4353,6 +4356,7 @@ static BooleanExpression matches(Field field, String rquery) { * * @return A new {@link Expression} representing the score operation. */ + @BetaApi public static Expression score() { return new FunctionExpression("score", com.google.common.collect.ImmutableList.of()); } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Field.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Field.java index 33f930022..f838e9ab6 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Field.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Field.java @@ -16,6 +16,7 @@ package com.google.cloud.firestore.pipeline.expressions; +import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.cloud.firestore.FieldPath; import com.google.cloud.firestore.Pipeline; @@ -97,6 +98,7 @@ public Value toProto() { * @param location Compute distance to this {@link com.google.cloud.firestore.GeoPoint}. * @return A new {@link Expression} representing the geoDistance operation. */ + @BetaApi public Expression geoDistance(com.google.cloud.firestore.GeoPoint location) { return Expression.geoDistance(this, location); }