Skip to content

Cbyrd/unified search api - #243

Merged
chrabyrd merged 11 commits into
mainfrom
cbyrd/unified-search-api
Sep 14, 2026
Merged

chrabyrd merged 11 commits into
mainfrom
cbyrd/unified-search-api

Conversation

@chrabyrd

@chrabyrd chrabyrd commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

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.

@apeters apeters left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

…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
@chrabyrd
chrabyrd merged commit ce21819 into main Sep 14, 2026
5 of 6 checks passed
@chrabyrd
chrabyrd deleted the cbyrd/unified-search-api branch September 14, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants