SearchResult

public struct SearchResult<T> : Codable, Equatable where T : Decodable, T : Encodable, T : Equatable

SearchResult instances represent the result of a search. Requires that the value T conforms to the Codable and Equatable protocols.

Properties

  • Possible hints from the search query.

    Declaration

    Swift

    public let hits: [T]
  • Number of documents skipped.

    Declaration

    Swift

    public let offset: Int
  • Number of documents taken.

    Declaration

    Swift

    public let limit: Int
  • Total number of matches,

    Declaration

    Swift

    public let nbHits: Int
  • Whether nbHits is exhaustive.

    Declaration

    Swift

    public let exhaustiveNbHits: Bool?
  • Distribution of the given facets.

    Declaration

    Swift

    public let facetsDistribution: [String : [String : Int]]?
  • Whether facetDistribution is exhaustive.

    Declaration

    Swift

    public let exhaustiveFacetsCount: Bool?
  • Time, in milliseconds, to process the query.

    Declaration

    Swift

    public let processingTimeMs: Int?
  • Query string from the search.

    Declaration

    Swift

    public let query: String?