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.
-
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?
-
init(query:
offset: limit: attributesToRetrieve: attributesToCrop: cropLength: attributesToHighlight: filter: sort: facetsDistribution: matches: ) Undocumented
Declaration
Swift
public init( query: String?, offset: Int? = nil, limit: Int? = nil, attributesToRetrieve: [String]? = nil, attributesToCrop: [String]? = nil, cropLength: Int? = nil, attributesToHighlight: [String]? = nil, filter: String? = nil, sort: [String]? = nil, facetsDistribution: [String]? = nil, matches: Bool? = nil)
-
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).