Skip to content

Add Allmaps map overlay search facet#263

Merged
ewlarson merged 1 commit into
developfrom
feature/allmaps-search-facet
May 27, 2026
Merged

Add Allmaps map overlay search facet#263
ewlarson merged 1 commit into
developfrom
feature/allmaps-search-facet

Conversation

@ewlarson

Copy link
Copy Markdown
Contributor

Summary

Adds the missing Map Overlay search facet so users can filter search results down to Allmaps-annotated maps from the main results page.

What changed

  • Indexes b1g_georeferenced_allmaps_b from resource_allmaps.annotated for Elasticsearch documents.
  • Adds the field to mappings, default search aggregations, facet endpoint validation, and legacy alias handling via map_overlay_agg.
  • Adds the frontend Map Overlay facet label/order and boolean value handling for true / false buckets.
  • Adds focused backend and frontend coverage for the new facet path.

Notes

Existing deployments will need a reindex before the facet counts appear, since the field is populated at index time.

Refs #72.

Validation

  • /Users/ewlarson/.pyenv/versions/3.13.1/bin/python -m pytest backend/tests/elasticsearch/test_index.py backend/tests/elasticsearch/test_facet_functions.py backend/tests/elasticsearch/test_mappings.py backend/tests/services/test_search_service.py backend/tests/api/v1/test_strong_params.py backend/tests/api/v1/test_facet_endpoint.py
  • npm test -- --run src/__tests__/utils/facetLabels.test.ts src/__tests__/utils/facetDisplay.test.ts src/__tests__/utils/searchParams.test.ts src/__tests__/components/FacetList.test.tsx
  • ./node_modules/.bin/eslint src/constants/facets.ts src/constants/fieldLabels.ts src/services/api.ts src/utils/facetDisplay.ts src/utils/facetLabels.ts src/utils/searchParams.ts src/__tests__/utils/facetLabels.test.ts src/__tests__/utils/facetDisplay.test.ts src/__tests__/utils/searchParams.test.ts src/__tests__/components/FacetList.test.tsx
  • /Users/ewlarson/.pyenv/versions/3.13.1/bin/python -m ruff check backend/app/api/v1/strong_params.py backend/app/elasticsearch/index.py backend/app/elasticsearch/mappings.py backend/app/elasticsearch/search.py backend/app/services/search_service.py backend/scripts/reindex_atomic.py backend/tests/api/v1/test_facet_endpoint.py backend/tests/api/v1/test_strong_params.py backend/tests/elasticsearch/test_facet_functions.py backend/tests/elasticsearch/test_mappings.py backend/tests/elasticsearch/test_index.py backend/tests/services/test_search_service.py
  • npm run build

@ewlarson ewlarson marked this pull request as ready for review May 27, 2026 18:20
@ewlarson ewlarson merged commit a950de6 into develop May 27, 2026
12 checks passed
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.

1 participant