Class YMKSearchOptions

Struct to fine-tune search request.

Class Methods

Properties

advertPageId

The landing page ID for ads.

appleCtx

The context from an Apple-directed session.

directPageId

The landing page ID for Yandex.Direct.

disableSpellingCorrection

Force disable misspell correction.

experimentalSnippets

Experimental snippets that will be requested.

geometry

Adds the geometry to the server response.

maxAdverts

Maximum number of advertised business objects in the response.

origin

String that sets an identifier for the request source.

resultPageSize

Maximum number of search results per page.

searchClosed

Enables searching for all businesses.

searchTypes

The search type can be one of YMKSearchType values or their bitwise 'OR' combination.

snippets

Snippets that will be requested.

suggestWords

Enable word-by-word suggestion items.

userPosition

The server uses the user position to calculate the distance from the user to search results.

Method Detail

+searchOptionsWithSearchTypes:resultPageSize:snippets:experimentalSnippets:userPosition:origin:directPageId:appleCtx:searchClosed:geometry:maxAdverts:advertPageId:suggestWords:disableSpellingCorrection:

+ (nonnull YMKSearchOptions *)searchOptionsWithSearchTypes:(YMKSearchType)searchTypes
                                            resultPageSize:(nullable NSNumber *)resultPageSize
                                                  snippets:(YMKSearchSnippet)snippets
                                      experimentalSnippets:(nonnull NSArray< NSString * > *)experimentalSnippets
                                              userPosition:(nullable YMKPoint *)userPosition
                                                    origin:(nullable NSString *)origin
                                              directPageId:(nullable NSString *)directPageId
                                                  appleCtx:(nullable NSString *)appleCtx
                                              searchClosed:(BOOL)searchClosed
                                                  geometry:(BOOL)geometry
                                                maxAdverts:(nullable NSNumber *)maxAdverts
                                              advertPageId:(nullable NSString *)advertPageId
                                              suggestWords:(BOOL)suggestWords
                                 disableSpellingCorrection:(BOOL)disableSpellingCorrection 

Property Detail

advertPageId

(copy, readwrite) NSString * advertPageId

The landing page ID for ads.

Optional property, can be null.

appleCtx

(copy, readwrite) NSString * appleCtx

The context from an Apple-directed session.

Optional property, can be null.

directPageId

(copy, readwrite) NSString * directPageId

The landing page ID for Yandex.Direct.

If set, the banners may be present in the search response.

Optional property, can be null.

disableSpellingCorrection

(assign, readwrite) BOOL disableSpellingCorrection

Force disable misspell correction.

experimentalSnippets

(strong, readwrite) NSArray< NSString * > * experimentalSnippets

Experimental snippets that will be requested.

Requested snippets can be found in YMKSearchExperimentalMetadata.

geometry

(assign, readwrite) BOOL geometry

Adds the geometry to the server response.

maxAdverts

(copy, readwrite) NSNumber * maxAdverts

Maximum number of advertised business objects in the response.

Optional property, can be null.

origin

(copy, readwrite) NSString * origin

String that sets an identifier for the request source.

Optional property, can be null.

resultPageSize

(copy, readwrite) NSNumber * resultPageSize

Maximum number of search results per page.

Optional property, can be null.

searchClosed

(assign, readwrite) BOOL searchClosed

Enables searching for all businesses.

Closed companies and companies from unreliable sources will be included.

searchTypes

(assign, readwrite) YMKSearchType searchTypes

The search type can be one of YMKSearchType values or their bitwise 'OR' combination.

If searchType is not initialized, it means to search in all the sources.

snippets

(assign, readwrite) YMKSearchSnippet snippets

Snippets that will be requested.

The value should be one of YMKSearchSnippet, or their bitwise 'OR' combination.

suggestWords

(assign, readwrite) BOOL suggestWords

Enable word-by-word suggestion items.

userPosition

(strong, readwrite) YMKPoint * userPosition

The server uses the user position to calculate the distance from the user to search results.

Optional property, can be null.