Reputation: 915
I'm trying to do a search with the tomtom sdk in android.
SearchApi searchApi = OnlineSearchApi.create(Activity.this);
searchApi.search(new FuzzySearchQueryBuilder(mSearchBar.getText().toString().trim())
.withPosition(new com.tomtom.online.sdk.common.location.LatLng(myLocation.getLatitude(), myLocation.getLongitude()))
.withTypeAhead(true)
.withLimit(10)
.build(), new FuzzySearchResultListener() {
@Override
public void onSearchResult(FuzzySearchResponse fuzzySearchResponse) {}
@Override
public void onSearchError(SearchError searchError) {}
});
My response has results not matching my query with field "Type" = "POI"
(Points of interest i assume). I want to display non-points-of-interest locations and show only addresses ("Type" = "Point Address") or cities ("Type" = "Geography") matching my query.
How do I achieve this?
Upvotes: 0
Views: 86
Reputation: 644
Use
.withIdx('Geo,PAD')
This parameter defines which indexes to be queried.
Upvotes: 1