PDA

View Full Version : SKNearbySearchSettings doesn't filter results when passing categories + keyword



mz87
07.12.2015, 13:37
Hi

Just want to make sure this situation ..



nearSets = new SKNearbySearchSettings();
nearSets.setLocation(new SKCoordinate(passedLng, passedLat));
nearSets.setRadius((short) 10000);
nearSets.setSearchMode(SKSearchManager.SKSearchMod e.OFFLINE);
nearSets.setSearchType(SKNearbySearchSettings.SKSe archType.POIS);
nearSets.setSearchResultsNumber(500);
nearSets.setSearchResultSortType(SKNearbySearchSet tings.SKSearchResultSortType.PROXIMITY_SORT);

nearSets.setSearchCategories(colected);
nearSets.setSearchTerm(keyword);

sksearchmanager.nearbySearch(nearSets);

If I don't select specific category then results get filtered by keyword .. But when I have some category selected (doesn't matter which one) - keyword parameter is ignored and nothing changes in my List ..

Am I right and this is the bug? Or there are any other way to filter POI's by Keyword+Category ?

As you see, there shouldn't be problem in the way how I pass selected categories via Intent, because results are filtered by fast food category in the image on the right..

Here are some logs:
1) working filter : SKSearchManager---- Nearby search object = SKNearbySearchSettings [radius=10000, searchTerm=mcdonald, location=[24.1675167,56.977519], searchMode=OFFLINE, searchType=POIS, searchResultSortType=PROXIMITY_SORT, maxSearchResultsNumber=500, searchCategories=null, searchLanguage=LANGUAGE_EN]
2) not working filter: SKSearchManager---- Nearby search object = SKNearbySearchSettings [radius=10000, searchTerm=mcdonald, location=[24.1675167,56.977519], searchMode=OFFLINE, searchType=POIS, searchResultSortType=PROXIMITY_SORT, maxSearchResultsNumber=500, searchCategories=[96], searchLanguage=LANGUAGE_EN]
or
2a) not working all food categories selected: SKSearchManager---- Nearby search object = SKNearbySearchSettings [radius=10000, searchTerm=mcdonald, location=[24.1675167,56.977519], searchMode=OFFLINE, searchType=POIS, searchResultSortType=PROXIMITY_SORT, maxSearchResultsNumber=500, searchCategories=[56, 96, 127, 179, 359], searchLanguage=LANGUAGE_EN]


2305

Adela_Silvia
14.12.2015, 16:21
We'll investigate this and get back as soon as possible with an answer.

mz87
04.01.2016, 14:49
Hi! Any news regarding this bug?

Adela_Silvia
08.01.2016, 10:37
Hi mZ87,
I have the answer from our dev team: we confirm it is a bug. Until we'll have a new build with this fix, as a workaround: set the search categories from the main categories enum(SKPOIMainCategories).

Let us know if we can help you with other questions.