Add category schema foundation to place and placex#4106
Open
Itz-Agasta wants to merge 3 commits into
Open
Conversation
Enables hierarchical category filtering by introducing ltree array columns and indexes for place data. Ensures database setup creates the necessary ltree extension and updates tests and import logic for category handling. Facilitates efficient category-based queries for POI and proximity searches.
Introduces handling for categories when inserting and updating place and placex entries, ensuring category data is properly stored and kept in sync with other attributes.
Introduces a new categories column of type ltree[] to the relevant tables, enabling future support for hierarchical place categorization. Ensures idempotency of the migration and includes tests to verify both schema change and repeated migration behavior. Prepares schema for upcoming backfill and propagation logic.
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.
Summary
This PR adds the db foundation for category support.
categoriesas anltree[]column in the import-sideplaceschemaltreeextensionplacex.categoriesplace -> placexpaths used during import and updatesAs per the plan this pr only deals with the schema foundation part. So we now have empty catagory columns in our tables. Next pr will introduce the Data plumbing logic so the empty columns get populated with proper osm category data (and we can benchmark the migartion/import speed here). 3rd pr will be dealing with cleanup of unsued tables and their artifacts and force existing nominatim services to use the newly introduced category column.
AI usage
The
test/python/tools/test_migration.pyfile's logic (do we really need it ?)Contributor guidelines (mandatory)