Class SearchOptions

com.yandex.mapkit.search

java.lang.Object ⇽ SearchOptions

public class SearchOptions

Struct to fine-tune search request.

Constructors

SearchOptions(int searchTypes, _Nullable Integer resultPageSize, int snippets, _NonNull List< String > experimentalSnippets, _Nullable Point userPosition, _Nullable String origin, _Nullable String directPageId, _Nullable String appleCtx, boolean searchClosed, boolean geometry, _Nullable Integer maxAdverts, _Nullable String advertPageId, boolean suggestWords, boolean disableSpellingCorrection)
SearchOptions()

Use constructor with parameters in your code.

Methods

String getAdvertPageId()

The landing page ID for ads.

String getAppleCtx()

The context from an Apple-directed session.

String getDirectPageId()

The landing page ID for Yandex.Direct.

boolean getDisableSpellingCorrection()

Force disable misspell correction.

List< String > getExperimentalSnippets()

Experimental snippets that will be requested.

boolean getGeometry()

Adds the geometry to the server response.

Integer getMaxAdverts()

Maximum number of advertised business objects in the response.

String getOrigin()

String that sets an identifier for the request source.

Integer getResultPageSize()

Maximum number of search results per page.

boolean getSearchClosed()

Enables searching for all businesses.

int getSearchTypes()

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

int getSnippets()

Snippets that will be requested.

boolean getSuggestWords()

Enable word-by-word suggestion items.

Point getUserPosition()

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

void serialize(Archive archive)
SearchOptions setAdvertPageId(@Nullable String advertPageId)

See getAdvertPageId().

SearchOptions setAppleCtx(@Nullable String appleCtx)

See getAppleCtx().

SearchOptions setDirectPageId(@Nullable String directPageId)

See getDirectPageId().

SearchOptions setDisableSpellingCorrection(boolean disableSpellingCorrection)

See getDisableSpellingCorrection().

SearchOptions setExperimentalSnippets(@NonNull List< String > experimentalSnippets)

See getExperimentalSnippets().

SearchOptions setGeometry(boolean geometry)

See getGeometry().

SearchOptions setMaxAdverts(@Nullable Integer maxAdverts)

See getMaxAdverts().

SearchOptions setOrigin(@Nullable String origin)

See getOrigin().

SearchOptions setResultPageSize(@Nullable Integer resultPageSize)

See getResultPageSize().

SearchOptions setSearchClosed(boolean searchClosed)

See getSearchClosed().

SearchOptions setSearchTypes(int searchTypes)

See getSearchTypes().

SearchOptions setSnippets(int snippets)

See getSnippets().

SearchOptions setSuggestWords(boolean suggestWords)

See getSuggestWords().

SearchOptions setUserPosition(@Nullable Point userPosition)

See getUserPosition().

Constructor Detail

SearchOptions

public SearchOptions (int searchTypes, @Nullable Integer resultPageSize, int snippets, @NonNull List< String > experimentalSnippets, @Nullable Point userPosition, @Nullable String origin, @Nullable String directPageId, @Nullable String appleCtx, boolean searchClosed, boolean geometry, @Nullable Integer maxAdverts, @Nullable String advertPageId, boolean suggestWords, boolean disableSpellingCorrection)

SearchOptions

public SearchOptions ()

Use constructor with parameters in your code.

This one is for bindings only!

Method Detail

getAdvertPageId

public String getAdvertPageId ()

The landing page ID for ads.

Optional field, can be null.

getAppleCtx

public String getAppleCtx ()

The context from an Apple-directed session.

Optional field, can be null.

getDirectPageId

public String getDirectPageId ()

The landing page ID for Yandex.Direct.

If set, the banners may be present in the search response.Optional field, can be null.

getDisableSpellingCorrection

public boolean getDisableSpellingCorrection ()

Force disable misspell correction.

getExperimentalSnippets

public List< String > getExperimentalSnippets ()

Experimental snippets that will be requested.

Requested snippets can be found in ExperimentalMetadata.

getGeometry

public boolean getGeometry ()

Adds the geometry to the server response.

getMaxAdverts

public Integer getMaxAdverts ()

Maximum number of advertised business objects in the response.

Optional field, can be null.

getOrigin

public String getOrigin ()

String that sets an identifier for the request source.

Optional field, can be null.

getResultPageSize

public Integer getResultPageSize ()

Maximum number of search results per page.

Optional field, can be null.

getSearchClosed

public boolean getSearchClosed ()

Enables searching for all businesses.

Closed companies and companies from unreliable sources will be included.

getSearchTypes

public int getSearchTypes ()

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

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

getSnippets

public int getSnippets ()

Snippets that will be requested.

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

getSuggestWords

public boolean getSuggestWords ()

Enable word-by-word suggestion items.

getUserPosition

public Point getUserPosition ()

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

Optional field, can be null.

serialize

public void serialize (Archive archive)

setAdvertPageId

public SearchOptions setAdvertPageId (@Nullable String advertPageId)

See getAdvertPageId().

setAppleCtx

public SearchOptions setAppleCtx (@Nullable String appleCtx)

See getAppleCtx().

setDirectPageId

public SearchOptions setDirectPageId (@Nullable String directPageId)

See getDirectPageId().

setDisableSpellingCorrection

public SearchOptions setDisableSpellingCorrection (boolean disableSpellingCorrection)

See getDisableSpellingCorrection().

setExperimentalSnippets

public SearchOptions setExperimentalSnippets (@NonNull List< String > experimentalSnippets)

See getExperimentalSnippets().

setGeometry

public SearchOptions setGeometry (boolean geometry)

See getGeometry().

setMaxAdverts

public SearchOptions setMaxAdverts (@Nullable Integer maxAdverts)

See getMaxAdverts().

setOrigin

public SearchOptions setOrigin (@Nullable String origin)

See getOrigin().

setResultPageSize

public SearchOptions setResultPageSize (@Nullable Integer resultPageSize)

See getResultPageSize().

setSearchClosed

public SearchOptions setSearchClosed (boolean searchClosed)

See getSearchClosed().

setSearchTypes

public SearchOptions setSearchTypes (int searchTypes)

See getSearchTypes().

setSnippets

public SearchOptions setSnippets (int snippets)

See getSnippets().

setSuggestWords

public SearchOptions setSuggestWords (boolean suggestWords)

See getSuggestWords().

setUserPosition

public SearchOptions setUserPosition (@Nullable Point userPosition)

See getUserPosition().