CIOAutocompleteQuery

public struct CIOAutocompleteQuery : CIORequestData

Struct encapsulating the necessary and additional parameters required to execute an autocomplete query.

  • The list of hidden metadata fields to return

    Declaration

    Swift

    public let hiddenFields: [String]?
  • Create an Autocomplete request query object

    Usage Example:

    let autocompleteQuery = CIOAutocompleteQuery(query: "apple", numResults: 5, numResultsForSection: ["Products": 6, "Search Suggestions": 8], hiddenFields: ["price_CA", "currency_CA"])
    

    Declaration

    Swift

    public init(query: String, filters: CIOQueryFilters? = nil, sectionFilters: [String : CIOQueryFilters]? = nil, numResults: Int? = nil, numResultsForSection: [String : Int]? = nil, hiddenFields: [String]? = nil, variationsMap: CIOQueryVariationsMap? = nil)

    Parameters

    query

    The user typed query to return results for

    numResults

    The number of results to return

    numResultsForSection

    The number of results to return for each section

    filters

    The filters used to refine results

    sectionFilters

    The filters to only apply to specific sections

    hiddenFields

    The list of hidden metadata fields to return