Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)));
Expand All @@ -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));
}
Expand Down Expand Up @@ -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());
}
Expand All @@ -4375,7 +4379,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)));
}
Expand All @@ -4397,7 +4403,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)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
Loading