feat: Add beta support for full-text search and geo search.#2346
Open
MarkDuckworth wants to merge 2 commits intomainfrom
Open
feat: Add beta support for full-text search and geo search.#2346MarkDuckworth wants to merge 2 commits intomainfrom
MarkDuckworth wants to merge 2 commits intomainfrom
Conversation
MarkDuckworth
commented
Mar 23, 2026
| @@ -0,0 +1,173 @@ | |||
| /* | |||
| * Copyright 2025 Google LLC | |||
| this(new FunctionExpression(name, java.util.Arrays.asList(params))); | ||
| } | ||
|
|
||
| BooleanFunctionExpression( |
Contributor
Author
There was a problem hiding this comment.
make internal or add tests
| this(name, params, java.util.Collections.emptyMap()); | ||
| } | ||
|
|
||
| FunctionExpression( |
Contributor
Author
There was a problem hiding this comment.
make internal or add tests
| @Before | ||
| public void setupRestaurantDocs() throws Exception { | ||
| restaurantsCollection = | ||
| firestore.collection("SearchIntegrationTests-" + LocalFirestoreHelper.autoId()); |
Contributor
Author
There was a problem hiding this comment.
We can't use autoID for search tests. These must use a collection with an index configured before the test run
| .pipeline() | ||
| .collection(restaurantsCollection.getId()) | ||
| .search( | ||
| Search.withQuery(documentMatches("menu:waffles")) |
Contributor
Author
There was a problem hiding this comment.
Should use query field("menu").matches(waffles).
| .pipeline() | ||
| .collection(restaurantsCollection.getId()) | ||
| .search( | ||
| Search.withQuery(documentMatches("menu:-waffles")) |
Contributor
Author
There was a problem hiding this comment.
same. field(x).matches(q) OR, just negate waffle in the document search
| .pipeline() | ||
| .collection(restaurantsCollection.getId()) | ||
| .search( | ||
| Search.withQuery(documentMatches("menu:tacos")) |
Contributor
Author
There was a problem hiding this comment.
"menu:query" will not be supported at launch, so just use documentMatches.
| .pipeline() | ||
| .collection(restaurantsCollection.getId()) | ||
| .search( | ||
| Search.withQuery(documentMatches("menu:tacos")) |
| .pipeline() | ||
| .collection(restaurantsCollection.getId()) | ||
| .search( | ||
| Search.withQuery(documentMatches("menu:tacos OR chicken")) |
| .pipeline() | ||
| .collection(restaurantsCollection.getId()) | ||
| .search( | ||
| Search.withQuery(documentMatches("menu:chicken OR tacos OR fish OR waffles")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
search