Class SearchOptions

com.yandex.mapkit.search

java.lang.Object ⇽ SearchOptions

public class SearchOptions

Struct to fine-tune search request.

Constructors

SearchOptions(int searchTypes, Integer resultPageSize, int snippets, Point userPosition, String origin, String directPageId, String directStatId, String appleCtx, boolean searchClosed, boolean geometry, Integer maxAdverts, String advertPageId, boolean suggestWords)
SearchOptions()

Use constructor with parameters in your code.

SearchOptions(int searchTypes, Integer resultPageSize, int snippets, Point userPosition, String origin, String directPageId, String directStatId, String appleCtx, boolean searchClosed, boolean geometry, Integer maxAdverts, String advertPageId, boolean suggestWords)
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.

String getDirectStatId()

Statistics ID for Yandex.Direct.

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(String advertPageId)

See getAdvertPageId().

SearchOptions setAppleCtx(String appleCtx)

See getAppleCtx().

SearchOptions setDirectPageId(String directPageId)

See getDirectPageId().

SearchOptions setDirectStatId(String directStatId)

See getDirectStatId().

SearchOptions setGeometry(boolean geometry)

See getGeometry().

SearchOptions setMaxAdverts(Integer maxAdverts)

See getMaxAdverts().

SearchOptions setOrigin(String origin)

See getOrigin().

SearchOptions setResultPageSize(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( Point userPosition)

See getUserPosition().

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.

String getDirectStatId()

Statistics ID for Yandex.Direct.

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(String advertPageId)

See getAdvertPageId().

SearchOptions setAppleCtx(String appleCtx)

See getAppleCtx().

SearchOptions setDirectPageId(String directPageId)

See getDirectPageId().

SearchOptions setDirectStatId(String directStatId)

See getDirectStatId().

SearchOptions setGeometry(boolean geometry)

See getGeometry().

SearchOptions setMaxAdverts(Integer maxAdverts)

See getMaxAdverts().

SearchOptions setOrigin(String origin)

See getOrigin().

SearchOptions setResultPageSize(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( Point userPosition)

See getUserPosition().

Constructor Detail

SearchOptions

public SearchOptions (int searchTypes, Integer resultPageSize, int snippets, Point userPosition, String origin, String directPageId, String directStatId, String appleCtx, boolean searchClosed, boolean geometry, Integer maxAdverts, String advertPageId, boolean suggestWords)

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.

If set, each ad will contain displayClick and searchClick YABS counters.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.

getDirectStatId

public String getDirectStatId ()

Statistics ID for Yandex.Direct.

Optional field, can be null.

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 (String advertPageId)

See getAdvertPageId().

setAppleCtx

public SearchOptions setAppleCtx (String appleCtx)

See getAppleCtx().

setDirectPageId

public SearchOptions setDirectPageId (String directPageId)

See getDirectPageId().

setDirectStatId

public SearchOptions setDirectStatId (String directStatId)

See getDirectStatId().

setGeometry

public SearchOptions setGeometry (boolean geometry)

See getGeometry().

setMaxAdverts

public SearchOptions setMaxAdverts (Integer maxAdverts)

See getMaxAdverts().

setOrigin

public SearchOptions setOrigin (String origin)

See getOrigin().

setResultPageSize

public SearchOptions setResultPageSize (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 (Point userPosition)

See getUserPosition().