Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DRAFT, for now, this will require updates to the
whosonfirst
importer (orpelias/model
?) before merging in order to ensure no breaking changes.This PR removes the
population
subqueries, as per the discussion in pelias/openstreetmap#493 (comment) we could copypopulation
info to thepopularity
field for admin areas and have one less subquery.There is some momentum building at the moment to improve
popularity
scoring (which was always enabled but rarely used).If we decide to go down that path then this PR will remove all the
population
subqueries.There should be a PR in
pelias/whosonfirst
orpelias/model
before this is merged which is responsible for setting the popularity.Note: if the schema and API are out-of-sync then admin areas could receive a 'double-boost' until this code is deployed, if that is a concern then it might be better to 'move' population info to popularity (setting population to 0) for a short migration period. Worth checking if there are differences in boost values between the fields in any of the defaults.
Finally, if we truly never need to search on
population
thenpelias/schema
could be updated to ensure that the field isn't indexed.