Skip to content

feat(firestore): pipeline search#16469

Open
daniel-sanche wants to merge 17 commits intomainfrom
firestore_pipelines_search
Open

feat(firestore): pipeline search#16469
daniel-sanche wants to merge 17 commits intomainfrom
firestore_pipelines_search

Conversation

@daniel-sanche
Copy link
Copy Markdown
Contributor

@daniel-sanche daniel-sanche commented Mar 27, 2026

Implements Search functionality:

  • new search stage
  • between expression (as alias for And(GreaterThanOrEqual(x), LessThanOrEqual(y))
  • geo_distance expression (for use in search stages only)
  • Score() expression (for use in search stages only)
  • SocumentMatches expression (for use in search stages only)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements full-text search functionality for Firestore pipelines, adding a new search stage along with SearchOptions and supporting expressions like between, geo_distance, and document_matches. The changes include updates to the base pipeline, expression definitions, and stage logic, supported by new system and unit tests. Review feedback recommends expanding type hints for the between method to include integers and simplifying the Search stage's protobuf serialization by removing a redundant null check.

Comment on lines +517 to +518
if self.options.query is not None:
options["query"] = self.options.query._to_pb()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The query parameter in SearchOptions.__init__ is not optional, and the initializer ensures self.options.query is always a BooleanExpression. Therefore, this if check for None is redundant and can be removed to simplify the code.

        options["query"] = self.options.query._to_pb()

@daniel-sanche daniel-sanche marked this pull request as ready for review March 31, 2026 18:03
@daniel-sanche daniel-sanche requested review from a team as code owners March 31, 2026 18:03
@daniel-sanche daniel-sanche changed the title [DRAFT] feat(firestore): pipeline search feat(firestore): pipeline search Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant