Skip to content

better population and popularity boosting - #338

Merged
missinglink merged 4 commits into
masterfrom
improved_population_popularity_boosting
Oct 8, 2015
Merged

better population and popularity boosting#338
missinglink merged 4 commits into
masterfrom
improved_population_popularity_boosting

Conversation

@missinglink

Copy link
Copy Markdown
Member

this PR fixes the popularity boosting and also adds population boosting.

originally I thought there was no population info but that was wrong, so now we use that too, which means:

/v1/autocomplete?text=london

before:
 1) London, United Kingdom
 2) East London, EASTERN CAPE
 3) New London County, CT
 4) London, Modum, Buskerud
 5) London, Dr Ruth Segomotsi Mompati District Municipality, North-West

after:
 1) London, Greater London, United Kingdom
 2) London, Middlesex, Ontario
 3) London, United Kingdom
 4) London, Madison County, OH
 5) London, Laurel County, KY

also there were issues with the popularity boost applying to ngram matching, now they both use phrase matching instead, so no more boosting partially matched admin results to the top:

(matching m d and t)

/v1/search?text=million dollar tacos

before:
 1) Santa Marã­a Del Tule, Oaxaca
 2) Tlacolula De Matamoros, Oaxaca
 3) Tepatitlã¡n De Morelos, Jalisco
 4) Martã­nez De La Torre, Veracruz de Ignacio de la Llave
 5) Mã¡rtires De Tacubaya, Oaxaca

after:
 1) Million Dollar Highway, Ouray County, CO
 2) 2 Million Dollar Lane, Nova Scotia
 3) 1 Million Dollar Lane, Nova Scotia
 4) Île Million Dollars, Quebec
 5) Million Dollar Baby, NANTES, Loire-Atlantique

since we are no longer only matching against admin0,admin1 and admin2 this solves the 'San Francisco problem':

/v1/autocomplete?text=san francisco

before:
 1) San Francisco Sola, Oaxaca
 2) San Francisco County
 3) San Francisco Ixhuatã¡n, Oaxaca
 4) San Francisco Cahuacuã¡, Oaxaca
 5) San Francisco Del Rincã³n, Guanajuato

after:
 1) San Francisco, San Francisco County, CA
 2) San Francisco, Cordoba
 3) San Francisco, San José, Heredia
 4) City of San Francisco, San Francisco, CA
 5) San Francisco County, CA

... plus much better results all around 🍷

@missinglink

Copy link
Copy Markdown
Member Author

closes #309 (this PR replaces that branch, which can be closed and deleted in favour of this one)

@missinglink

Copy link
Copy Markdown
Member Author

added 2x new commits to balance queries even more, 2ce249a adds more emphasis to local results and 8ceac4c changes the modifier from sqrt() to log1p() which gives better ranges for mixing with local results.

now we get the correct top 2 results for ?text=london 🍞

 1) London, Greater London, United Kingdom
 2) London, Middlesex, Ontario

this is on the bigdev staging cluster, please test it out

@dianashk

dianashk commented Oct 8, 2015

Copy link
Copy Markdown
Contributor

This is awesome! 👍

@randymeech

Copy link
Copy Markdown
Member

💯

missinglink added a commit that referenced this pull request Oct 8, 2015
…osting

better population and popularity boosting
@missinglink
missinglink merged commit 928f061 into master Oct 8, 2015
@missinglink missinglink mentioned this pull request Oct 8, 2015
@orangejulius
orangejulius deleted the improved_population_popularity_boosting branch March 26, 2016 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants