-
-
Notifications
You must be signed in to change notification settings - Fork 795
Use search_name as fallback for TIGER imports when update tables are dropped
#3906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
lonvia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that's the general direction I had in mind. I added a few inline comments,
There is a little gottcha here: the table search_name might not exist either, when Nominatim was set up in reverse-only mode. You could in that case fall back to doing name matching on placex entries or just tell the user that import is not possible.
|
Hello, thanks for the reviews. I’m still getting familiar with parts of the codebase. Going through the sql-preprocessor code was very helpful.
based on my understanding, falling back to name matching on placex would be prohibitively slow for practically large databases, thus I’ve leaned towards explicitly reporting that the import is not possible in this configuration. |
lonvia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this against a planet database. It's fairly fast but it leaves quite a few interpolations unmatched because the street name doesn't fit well enough. It would be good to have a replacement for getNearestParallelRoadFeture() as well which uses the placex table (again address_rank between 26 and 27 only) to find any parallel road.
fc02d24 to
5063b08
Compare
5063b08 to
eefd0ef
Compare
|
Thanks for testing over planet db. I have added |
Closes #2463
This PR adds a fallback lookup that uses the persistent
search_nametable when the update information tables have been dropped. The existing lookup logic remains the primary path; only when anundefined_tableexception is raised do we resolve the road viasearch_nameinstead.The new
getNearestNamedRoadPlaceIdSlowfunction leverages the existingidx_search_name_name_vectorGIN index, which efficiently filters candidates by checking overlap betweenname_vectorand the providedtoken_info, keeping the fallback reasonably fast (still slower thangetNearestNamedRoadPlaceId).