Repository navigation
Cbyrd/unified search api - #243
Merged
Merged
Conversation
through_resource_search's hop traversal was hardcoded to exactly 2 hops and specific to text matching. This pulls the traversal logic out into a reusable, table-agnostic N-hop engine, and relocates term matching and suggestions into a new node_agnostic_search package alongside it.
geometry_matching.py and date_matching.py mirror term_matching.py's shape, so map and date-range filters can hop across relationships the same way text search already does.
…registries AdvancedSearchQueryCompiler used to build its own FacetRegistry and SearchModelRegistry on every instantiation, re-reading the small facet table each time. It now accepts them as optional constructor arguments, so a caller compiling many payloads in one request can build them once and share them.
SearchCompiler loops AdvancedSearchQueryCompiler once per resource graph and unions the results in SQL, never materializing anything in Python. Each graph is narrowed by node_agnostic_filters (TEXT_MATCH/GEO_INTERSECTS/DATE_RANGE) via pre_filter, and resource_type_counts/all_resource_count are both derived from one small per-graph count query instead of three separate ones.
SimpleSearchAPI and AdvancedSearchAPI are gone; one endpoint now backs both. This removes the old views and the simple_search utils package, repoints the two other direct callers of the removed query builder, and updates the affected tests.
SimpleSearch and AdvancedSearch's API clients now build the new request shape (graph_ids/node_agnostic_filters/advanced_search_query) and target api/search instead of their old separate endpoints.
The "all date nodes" case (no specific node selected) now emits a DATE_RANGE node_agnostic_filters entry instead of an embedded advanced_search_query clause, consistent with how text and map filtering already work. Saved-search storage is unchanged — only how it's translated into the outgoing request differs.
…into cbyrd/unified-search-api
…244) * adds fetching resource fields and extra node data for search results * cleaning * nit * refactor * refactor * cleaning * adds a RESOURCE_FIELD clause subject and per-graph advanced search payloads * folds geometry and date filters into clauses, leaving term_search * extracts search into utils/search and regroups utils by concern * documents the search payload and scopes the facet seed migration's reverse * cleaning * nit * cleaning * cleaning * refactor * clean additionl_data * nit * refactor * cleaning * nit * updates readme * nit * PR feedback * nit * updates permissions and narrow resource count to queried models * cleaning * nit * nit * nit
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.
No description provided.