Skip to content

[Feature] Implement Geospatial Indexing for Matching Queries #7

Open

Description

@getdownandcode

Problem

Nearby donor queries scan entire collection without indexes. Performance degrades as donor database grows.

Impact

  • Matching queries become slow
  • Cannot scale to thousands of donors
  • Geographic queries inefficient

Solution

Add MongoDB 2dsphere indexes on location fields:

  • Donor.location (GeoJSON Point)
  • Inventory.location (GeoJSON Point)
  • Hospital.location (GeoJSON Point)

Acceptance Criteria

  • 2dsphere indexes created on all location fields
  • Query performance benchmarked
  • Nearby queries use indexes (verify with explain)
  • Tests confirm performance improvement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions