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 correction of spelling mistakes.

experimentalSnippets

Experimental snippets that will be requested.

geometry

Adds the geometry to the server response.

origin

String that sets an identifier for the request source.

resultPageSize

Maximum number of search results per page.

searchTypes

The search type can be one of the 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:geometry: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
                                                  geometry:(BOOL)geometry
                                              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.

Used with 'Direct' SearchType.

Optional property, can be null.

disableSpellingCorrection

(assign, readwrite) BOOL disableSpellingCorrection

Force disable correction of spelling mistakes.

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.

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.

searchTypes

(assign, readwrite) YMKSearchType searchTypes

The search type can be one of the 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.