SearchParameters

public struct SearchParameters : Codable, Equatable

SearchParameters instances represent query setup for a search request. Use SearchParameters.query to directly create a search query with the default search configuration.

Properties

  • Query string (mandatory).

    Declaration

    Swift

    public let query: String?
  • Number of documents to take.

    Declaration

    Swift

    public let limit: Int?
  • Number of documents to skip.

    Declaration

    Swift

    public let offset: Int?
  • Document attributes to show.

    Declaration

    Swift

    public let attributesToRetrieve: [String]?
  • Which attributes to crop.

    Declaration

    Swift

    public let attributesToCrop: [String]?
  • Limit length at which to crop specified attributes.

    Declaration

    Swift

    public let cropLength: Int?
  • Which attributes to highlight.

    Declaration

    Swift

    public let attributesToHighlight: [String]?
  • Filter on attributes values.

    Declaration

    Swift

    public let filter: String?
  • Filter on attributes values.

    Declaration

    Swift

    public let sort: [String]?
  • Retrieve the count of matching terms for each facets.

    Declaration

    Swift

    public let facetsDistribution: [String]?
  • Whether to return the raw matches or not.

    Declaration

    Swift

    public let matches: Bool?

Initializers

Query Initializers

  • Minimal static function used to easily initialize the SearchParameters instance with the search query applied.

    Declaration

    Swift

    public static func query(_ value: String) -> SearchParameters

    Parameters

    value

    Query string (mandatory).