mapbox / mapbox/mapbox-search-ios
MapboxSearch.SearchResultMetadata values are all nil
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 28
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
The received results from the following function contain no metadata for all categories.
```swift
func categorySearchResultsReceived(category: SearchCategory, results: [SearchResult]) {}
```
Here's an example of a restaurant's metadata:
`MapboxSearch.SearchResultMetadata(data: ["iso_3166_2": "GB-ENG", "iso_3166_1": "gb"], primaryImage: nil, otherImages: nil, phone: nil, website: nil, reviewCount: nil, averageRating: nil, openHours: nil)`
Here's the configuration of the search box.
```swift
lazy var searchController: MapboxSearchController = {
var configuration = Configuration(hideCategorySlots: true)
return MapboxSearchController(configuration: configuration)
}()
lazy var panelController = MapboxPanelController(rootViewController: searchController)
```
I'm using Mapbox search 1.0.0-rc.8. Am I missing something in the configuration?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the categorySearchResultsReceived callback and the MapboxSearchController Configuration shown in the report, reproducing the issue on Mapbox Search 1.0.0-rc.8. Trace why SearchResultMetadata contains only the ISO country fields and determine whether configuration affects the remaining metadata. Done means the relevant metadata is populated for category search results or the missing-data behavior is documented and covered by an appropriate regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100