FirebaseFirestore Framework Reference

DocumentMatches

public struct DocumentMatches : BooleanExpression, BridgeWrapper, @unchecked Sendable

A full-text search against all indexed search fields in the document.

Note

This API is in beta.

Note: This expression can only be used in the search stage.

Example usage in a search stage:

firestore.pipeline()
  .collection("restaurants")
  .search(query: DocumentMatches("waffles OR pancakes"))
  • Undocumented

    Declaration

    Swift

    public let bridge: ExprBridge
  • Creates a document search expression.

    Declaration

    Swift

    public init(_ query: String)

    Parameters

    query

    The text to search for.