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, @Nullable Point userPosition, @Nullable String origin, boolean geometry, boolean suggestWords, boolean disableSpellingCorrection)
SearchOptions()

Use constructor with parameters in your code.

Methods

boolean getDisableSpellingCorrection()

Force disable correction of spelling mistakes.

boolean getGeometry()

Adds the geometry to the server response.

String getOrigin()

String that sets an identifier for the request source.

Integer getResultPageSize()

Maximum number of search results per page.

int getSearchTypes()

The search type can be one of the 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 setDisableSpellingCorrection(boolean disableSpellingCorrection)

See getDisableSpellingCorrection().

SearchOptions setGeometry(boolean geometry)

See getGeometry().

SearchOptions setOrigin(@Nullable String origin)

See getOrigin().

SearchOptions setResultPageSize(@Nullable Integer resultPageSize)

See getResultPageSize().

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, @Nullable Point userPosition, @Nullable String origin, boolean geometry, boolean suggestWords, boolean disableSpellingCorrection)

SearchOptions

public SearchOptions ()

Use constructor with parameters in your code.

This one is for bindings only!

Method Detail

getDisableSpellingCorrection

public boolean getDisableSpellingCorrection ()

Force disable correction of spelling mistakes.

getGeometry

public boolean getGeometry ()

Adds the geometry to the server response.

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.

getSearchTypes

public int getSearchTypes ()

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

setDisableSpellingCorrection

public SearchOptions setDisableSpellingCorrection (boolean disableSpellingCorrection)

See getDisableSpellingCorrection().

setGeometry

public SearchOptions setGeometry (boolean geometry)

See getGeometry().

setOrigin

public SearchOptions setOrigin (@Nullable String origin)

See getOrigin().

setResultPageSize

public SearchOptions setResultPageSize (@Nullable Integer resultPageSize)

See getResultPageSize().

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().