FirebaseFirestore Framework Reference

Score

public struct Score : Expression, BridgeWrapper, @unchecked Sendable

Represents the relevance score of a document against the search query.

Note

This API is in beta.

Example usage:

firestore.pipeline().collection("restaurants")
.search(
  query: "waffles OR pancakes",
  sort: [ Score().as("searchScore") ]
)
  • Undocumented

    Declaration

    Swift

    public let bridge: ExprBridge
  • Undocumented

    Declaration

    Swift

    public init()