popularity scoring for "important" venues#394
Merged
Merged
Conversation
Member
Author
|
@Joxit pulling in the latest These are expected right? @@ -2261,6 +2564,9 @@
],
"locality_a": [
null
+ ],
+ "locality_source": [
+ null
]
},
"center_point": { |
Member
|
Yes, this is the expected result. The next step will be this : diff --git a/lib/streams/overrideLookedUpLocalityAndLocaladmin.js b/lib/streams/overrideLookedUpLocalityAndLocaladmin.js
index 38d9388..f99de68 100644
--- a/lib/streams/overrideLookedUpLocalityAndLocaladmin.js
+++ b/lib/streams/overrideLookedUpLocalityAndLocaladmin.js
@@ -14,13 +14,13 @@ function reassignParent(document, layer) {
document.clearParent(layer);
// primary name
- document.addParent(layer, document.getName('default'), document.getId());
+ document.addParent(layer, document.getName('default'), document.getId(), null, 'geonames');
// name aliases
let aliases = document.getNameAliases('default');
if( aliases.length ){
aliases.forEach( alias => {
- document.addParent(layer, alias, document.getId());
+ document.addParent(layer, alias, document.getId(), null, 'geonames');
});
}
} |
Joxit
approved these changes
Mar 5, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Today I was investigating the scoring of the autocomplete query Angkor Wat.
The top three results are:
The top two results are from OSM and score higher due to a
popularityscore, despite the last result having a lower field length.This PR adds the ability to control popularity scores in geonames that mirrors the functionality we introduced for OSM venue scoring.
For now I've only added two feature codes, but open to adding more later.
I've also edited that one specific Angkor Wat geonames record to give it a more appropriate feature code (previously
RUIN).Regarding future extension/detection, I've added the feature code to the addendum so we can establish trends in the data which may require future changes and aid in rapid debugging/fixing of those cases.
This code is showing its age, I decided to purposely avoid modernising the code or making code cleanup, although I couldn't resist tightening up some
IFconditions and bumping thepelias/modelpackage.