tripkit-android / com.skedgo.geocoding.agregator / MultiSourceGeocodingAggregator

MultiSourceGeocodingAggregator

open class MultiSourceGeocodingAggregator<T :GCResultInterface!>

Scoring formulas Favourites: max(title, address) Search history: max(title, address) Regions: distance Address book: (title + address) / 2 Calendar: (title + address) / 2 SkedGo transit stops: popularity -> ((min(popularity, GOOD_SCORE)) / (GOOD_SCORE / 100)) * 2 SkedGo others: title Google: (max(title, address) * 3 + distance) / 4 Google Autocomplete: (title * 3) / 4 Foursquare: ((title * 3 + distance) / 4) * suburb Title score: score based on input string against the title of the result Address score: score based on input string against address of the result Distance score: score based on distance to center or provided region Suburb score: bonus score if result is a suburb Popularity score: score based on popularity of result as determined by server

Functions

Name Summary
aggregate open fun aggregate(userQuery:GCQueryInterface!, providersResults:MutableList<MutableList<T>!>!):MutableList<MGAResultInterface<T>!>!
flattenAggregate open fun flattenAggregate(userQuery:GCQueryInterface!, providersResults:MutableList<MutableList<T>!>!):MutableList<GCResultInterface!>!
getInstance open static fun getInstance():MultiSourceGeocodingAggregator<GCResultInterface!>!